diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2019-01-03 21:52:32 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2019-01-03 21:52:32 +0000 |
commit | a80f96e99892275f32e8240770ead14bd5114e6f (patch) | |
tree | cfa92e1e78c732b4c8a9ec5bec4ccaa7f8927e7f /sys/kern/vfs_lookup.c | |
parent | e8944bb89356dbfd29a3d47b7a73fe025c80f844 (diff) |
Fix a collection of covering unveil bugs that prevent unveil's of upper
level directories from working when you don't traverse into them starting
from /. Most found by brynet@ and a few others.
ok brynet@ deraadt@
Diffstat (limited to 'sys/kern/vfs_lookup.c')
-rw-r--r-- | sys/kern/vfs_lookup.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index d9596addf93..e9637a7f3e4 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_lookup.c,v 1.75 2018/10/28 22:42:33 beck Exp $ */ +/* $OpenBSD: vfs_lookup.c,v 1.76 2019/01/03 21:52:31 beck Exp $ */ /* $NetBSD: vfs_lookup.c,v 1.17 1996/02/09 19:00:59 christos Exp $ */ /* @@ -188,8 +188,6 @@ fail: * Check if starting from root directory or current directory. */ if (cnp->cn_pnbuf[0] == '/') { - curproc->p_p->ps_uvpcwd = NULL; - curproc->p_p->ps_uvpcwdgone = 0; dp = ndp->ni_rootdir; vref(dp); } else if (ndp->ni_dirfd == AT_FDCWD) { @@ -304,7 +302,6 @@ badlink: dp = ndp->ni_rootdir; vref(dp); ndp->ni_unveil_match = NULL; - curproc->p_p->ps_uvpcwd = NULL; unveil_check_component(p, ndp, dp); } } @@ -500,8 +497,6 @@ dirloop: ndp->ni_dvp = dp; ndp->ni_vp = dp; vref(dp); - curproc->p_p->ps_uvpcwd = NULL; - curproc->p_p->ps_uvpcwdgone = 0; ndp->ni_unveil_match = NULL; goto nextname; } |