diff options
author | Scott Soule Cheloha <cheloha@cvs.openbsd.org> | 2022-02-09 01:58:58 +0000 |
---|---|---|
committer | Scott Soule Cheloha <cheloha@cvs.openbsd.org> | 2022-02-09 01:58:58 +0000 |
commit | 58e92a8e3b58a6422d36c6e7141f18b6a930d8f2 (patch) | |
tree | 5b04c7f98895142c02e3e79831af83b60d7c8851 /bin/cat | |
parent | fed07de9140c3c7c87d45acf4692f8b4e3c48c93 (diff) |
cat(1): drop "rpath" promise in no-file case
If we're only working with the standard input we don't need "rpath".
Tweaked by mestre@.
Thread: https://marc.info/?l=openbsd-tech&m=163941848104274&w=2
No objections on tech@ after several weeks.
Diffstat (limited to 'bin/cat')
-rw-r--r-- | bin/cat/cat.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/cat/cat.c b/bin/cat/cat.c index 129c3696870..a2eff2e1b30 100644 --- a/bin/cat/cat.c +++ b/bin/cat/cat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cat.c,v 1.33 2022/02/09 01:56:28 cheloha Exp $ */ +/* $OpenBSD: cat.c,v 1.34 2022/02/09 01:58:57 cheloha Exp $ */ /* $NetBSD: cat.c,v 1.11 1995/09/07 06:12:54 jtc Exp $ */ /* @@ -95,6 +95,9 @@ main(int argc, char *argv[]) argv += optind; if (argc == 0) { + if (pledge("stdio", NULL) == -1) + err(1, "pledge"); + cat_file(NULL); } else { for (; *argv != NULL; argv++) |