diff options
author | Scott Soule Cheloha <cheloha@cvs.openbsd.org> | 2022-02-08 17:44:19 +0000 |
---|---|---|
committer | Scott Soule Cheloha <cheloha@cvs.openbsd.org> | 2022-02-08 17:44:19 +0000 |
commit | b38229d1fdf82fcbd73fc16819c5643d4b9b068d (patch) | |
tree | 5a1d5b6cb6b697a1901e93017176e9809ea6d715 /usr.bin | |
parent | 6111415a63b71b256e714a9842d43b1d9458c126 (diff) |
rev(1): drop "rpath" promise in no-file branch.
We don't need "rpath" if we're only processing the standard input.
Thread: https://marc.info/?l=openbsd-tech&m=164433848419371&w=2
ok deraadt@ millert@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/rev/rev.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/rev/rev.c b/usr.bin/rev/rev.c index 9314c2b5e9e..5938e062322 100644 --- a/usr.bin/rev/rev.c +++ b/usr.bin/rev/rev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rev.c,v 1.15 2022/01/29 00:11:54 cheloha Exp $ */ +/* $OpenBSD: rev.c,v 1.16 2022/02/08 17:44:18 cheloha Exp $ */ /* $NetBSD: rev.c,v 1.5 1995/09/28 08:49:40 tls Exp $ */ /*- @@ -68,6 +68,9 @@ main(int argc, char *argv[]) rval = 0; if (argc == 0) { + if (pledge("stdio", NULL) == -1) + err(1, "pledge"); + rval = rev_file(NULL); } else { for (; *argv != NULL; argv++) |