summaryrefslogtreecommitdiff
path: root/sys/kern/kern_pledge.c
diff options
context:
space:
mode:
authorSebastien Marie <semarie@cvs.openbsd.org>2021-06-09 17:52:48 +0000
committerSebastien Marie <semarie@cvs.openbsd.org>2021-06-09 17:52:48 +0000
commit5a46c4cad92f1b49588a81873a9baa521e7337a6 (patch)
tree3e1edfd4fce4d5b2ad439d0a8cc73afcd114ce25 /sys/kern/kern_pledge.c
parentee8a0842af4dfc49aba0d68eae55cd7ff4199322 (diff)
unveil: small cleanup for UNVEIL_INSPECT
remove two leftover checks which were used when ni_unveil was used with UNVEIL_INSPECT. it was used by: - readlink(2) - removed 2019-08-31 - stat(2) and access(2) - removed 2019-03-24 ok claudio@
Diffstat (limited to 'sys/kern/kern_pledge.c')
-rw-r--r--sys/kern/kern_pledge.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c
index 430307f6523..8329153a8fb 100644
--- a/sys/kern/kern_pledge.c
+++ b/sys/kern/kern_pledge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_pledge.c,v 1.272 2021/04/30 02:06:22 deraadt Exp $ */
+/* $OpenBSD: kern_pledge.c,v 1.273 2021/06/09 17:52:47 semarie Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -623,8 +623,7 @@ pledge_namei(struct proc *p, struct nameidata *ni, char *origpath)
/* when avoiding YP mode, getpw* functions touch this */
if (ni->ni_pledge == PLEDGE_RPATH &&
strcmp(path, "/var/run/ypbind.lock") == 0) {
- if ((p->p_p->ps_pledge & PLEDGE_GETPW) ||
- (ni->ni_unveil == UNVEIL_INSPECT)) {
+ if (p->p_p->ps_pledge & PLEDGE_GETPW) {
ni->ni_cnd.cn_flags |= BYPASSUNVEIL;
return (0);
} else