diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2015-11-01 18:18:00 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2015-11-01 18:18:00 +0000 |
commit | b249aebdcb012545f1aa7bab683224c46dc508fc (patch) | |
tree | 122044c850ddcbcf708b7214046f38f2c7317edb /usr.bin/m4 | |
parent | b00466cafde2c4b6a471fa49b1fc9a360cb612c0 (diff) |
pledge m4. tested by me.
reordered to match the manpage, and added tmppath as an annotation
prompted by deraadt@
Diffstat (limited to 'usr.bin/m4')
-rw-r--r-- | usr.bin/m4/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/m4/main.c b/usr.bin/m4/main.c index b75877fbf9a..5336268f681 100644 --- a/usr.bin/m4/main.c +++ b/usr.bin/m4/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.84 2014/12/21 09:33:12 espie Exp $ */ +/* $OpenBSD: main.c,v 1.85 2015/11/01 18:17:59 espie Exp $ */ /* $NetBSD: main.c,v 1.12 1997/02/08 23:54:49 cgd Exp $ */ /*- @@ -174,6 +174,9 @@ main(int argc, char *argv[]) int n; char *p; + if (pledge("stdio rpath wpath cpath tmppath proc exec", NULL) == -1) + err(1, "pledge"); + if (signal(SIGINT, SIG_IGN) != SIG_IGN) signal(SIGINT, onintr); |