artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b808fb8
)
pledge "stdio rpath"
author
deraadt
<deraadt@openbsd.org>
Sat, 10 Oct 2015 19:02:19 +0000
(19:02 +0000)
committer
deraadt
<deraadt@openbsd.org>
Sat, 10 Oct 2015 19:02:19 +0000
(19:02 +0000)
ok beck doug
usr.bin/which/which.c
patch
|
blob
|
history
diff --git
a/usr.bin/which/which.c
b/usr.bin/which/which.c
index
1f2bb65
..
3281a78
100644
(file)
--- a/
usr.bin/which/which.c
+++ b/
usr.bin/which/which.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: which.c,v 1.2
0 2015/01/16 06:40:14
deraadt Exp $ */
+/* $OpenBSD: which.c,v 1.2
1 2015/10/10 19:02:19
deraadt Exp $ */
/*
* Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
@@
-84,6
+84,9
@@
main(int argc, char *argv[])
if (setuid(geteuid()))
err(1, "Can't set uid to %u", geteuid());
+ if (pledge("stdio rpath", NULL) == -1)
+ err(1, "pledge");
+
for (n = 0; n < argc; n++)
if (findprog(argv[n], path, progmode, allmatches) == 0)
notfound++;