diff options
author | 2015-10-10 21:15:25 +0000 | |
---|---|---|
committer | 2015-10-10 21:15:25 +0000 | |
commit | e1704018d5bae3679342a2e1fc943d8ddf230155 (patch) | |
tree | eed55fea3a9ea8a57862988919f383961d2373d0 | |
parent | pledge "stdio inet rpath" seems to be enough for a YP environment. (diff) | |
download | wireguard-openbsd-e1704018d5bae3679342a2e1fc943d8ddf230155.tar.xz wireguard-openbsd-e1704018d5bae3679342a2e1fc943d8ddf230155.zip |
Kill pledges to only use "stdio proc".
deraadt@ notes that kill now works because of improved kernel semantics.
For full kill(1) functionality, you need the new kern_sig functionality.
Make sure you have an updated kernel.
ok deraadt@
-rw-r--r-- | bin/kill/kill.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/kill/kill.c b/bin/kill/kill.c index c05c150ddae..df229825d00 100644 --- a/bin/kill/kill.c +++ b/bin/kill/kill.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kill.c,v 1.12 2014/03/23 12:44:00 millert Exp $ */ +/* $OpenBSD: kill.c,v 1.13 2015/10/10 21:15:25 doug Exp $ */ /* $NetBSD: kill.c,v 1.11 1995/09/07 06:30:27 jtc Exp $ */ /* @@ -37,6 +37,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <unistd.h> extern char *__progname; @@ -51,6 +52,9 @@ main(int argc, char *argv[]) int errors, numsig, pid; char *ep; + if (pledge("stdio proc", NULL) == -1) + err(1, "pledge"); + if (argc < 2) usage(); |