summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-11-23 21:32:29 +0000
committerderaadt <deraadt@openbsd.org>2015-11-23 21:32:29 +0000
commit1d2979c371dcbab7c9f2e8dfc63f1b2579112b6d (patch)
tree0e52298b6a68a0e49230f0af1512c52168b84ff8
parentaccept4() is restarted after signals which prevents vmd from exiting (diff)
downloadwireguard-openbsd-1d2979c371dcbab7c9f2e8dfc63f1b2579112b6d.tar.xz
wireguard-openbsd-1d2979c371dcbab7c9f2e8dfc63f1b2579112b6d.zip
the "getpw" test for /dev/tty is only needed for readpassphrase(3),
getpass(3), so don't specifically allow it for "rpath" (rpath will accept it in the end, unless it is on the whitelist)
-rw-r--r--sys/kern/kern_pledge.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c
index 10c9b4c6879..b7b71b46e76 100644
--- a/sys/kern/kern_pledge.c
+++ b/sys/kern/kern_pledge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_pledge.c,v 1.121 2015/11/23 07:23:24 deraadt Exp $ */
+/* $OpenBSD: kern_pledge.c,v 1.122 2015/11/23 21:32:29 deraadt Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -645,8 +645,8 @@ pledge_namei(struct proc *p, struct nameidata *ni, char *origpath)
return (0);
}
- /* readpassphrase(3), getpw*(3) */
- if ((p->p_p->ps_pledge & (PLEDGE_TTY | PLEDGE_GETPW)) &&
+ /* readpassphrase(3), getpass(3) */
+ if ((p->p_p->ps_pledge & PLEDGE_TTY) &&
(ni->ni_pledge & ~(PLEDGE_RPATH | PLEDGE_WPATH)) == 0 &&
strcmp(path, "/dev/tty") == 0) {
return (0);