diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-11-11 15:10:21 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-11-11 15:10:21 +0000 |
commit | 6a2b5126bdf57699cb7368b2c837690b7e355cda (patch) | |
tree | 12e0cd38baec34b81a1ad5a370966ee05d6181c5 /usr.bin/mg | |
parent | 65344a7988ce2ee6d723e31b74015fc25ed78b15 (diff) |
pledge "stdio rpath wpath cpath fattr proc exec tty" seems to work.
there are a few system, popen, fork...
ok florian
Diffstat (limited to 'usr.bin/mg')
-rw-r--r-- | usr.bin/mg/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/mg/main.c b/usr.bin/mg/main.c index b3bee6b09af..7f5e235fe8a 100644 --- a/usr.bin/mg/main.c +++ b/usr.bin/mg/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.77 2015/11/08 19:31:57 jasper Exp $ */ +/* $OpenBSD: main.c,v 1.78 2015/11/11 15:10:20 deraadt Exp $ */ /* This file is in the public domain. */ @@ -56,6 +56,9 @@ main(int argc, char **argv) int nobackups = 0; struct buffer *bp = NULL; + if (pledge("stdio rpath wpath cpath fattr proc exec tty", NULL) == -1) + err(1, "pledge"); + while ((o = getopt(argc, argv, "nf:")) != -1) switch (o) { case 'n': |