diff options
author | Gleydson Soares <gsoares@cvs.openbsd.org> | 2015-12-29 19:04:47 +0000 |
---|---|---|
committer | Gleydson Soares <gsoares@cvs.openbsd.org> | 2015-12-29 19:04:47 +0000 |
commit | 9a7ad9bc671dfac4e4bff7b42c15771dfebe74e0 (patch) | |
tree | 986bfd621400a7e24a44a7b54c9c2875af099442 /usr.bin/which | |
parent | fa9be73bc12da2e753d60deda85fd4d5088dfe8d (diff) |
fix exit status on pledge(2) failure.
OK tb@ jsg@
Diffstat (limited to 'usr.bin/which')
-rw-r--r-- | usr.bin/which/which.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/which/which.c b/usr.bin/which/which.c index 3281a78c6d9..8aa6428f78a 100644 --- a/usr.bin/which/which.c +++ b/usr.bin/which/which.c @@ -1,4 +1,4 @@ -/* $OpenBSD: which.c,v 1.21 2015/10/10 19:02:19 deraadt Exp $ */ +/* $OpenBSD: which.c,v 1.22 2015/12/29 19:04:46 gsoares Exp $ */ /* * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> @@ -85,7 +85,7 @@ main(int argc, char *argv[]) err(1, "Can't set uid to %u", geteuid()); if (pledge("stdio rpath", NULL) == -1) - err(1, "pledge"); + err(2, "pledge"); for (n = 0; n < argc; n++) if (findprog(argv[n], path, progmode, allmatches) == 0) |