diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-07-16 07:59:39 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-07-16 07:59:39 +0000 |
commit | 5248be10194d9431586f2417b4c61f5e781b162f (patch) | |
tree | d61767c7ae9137236171370de971ae72970d21cc /sys/kern/vfs_syscalls.c | |
parent | 142d12247012449202ff4004e4a315b1e33718b0 (diff) |
Remove the unveil current directory pointer from struct process. Instead
pass in the vnode to unveil_start_relative() like it is done for *at()
syscalls. This fixes an issue with fchdir() that actually did not correctly
reset this pointer when changing the working directory.
OK beck@
Diffstat (limited to 'sys/kern/vfs_syscalls.c')
-rw-r--r-- | sys/kern/vfs_syscalls.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index e2681bb8010..3a5db48992e 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_syscalls.c,v 1.351 2021/07/08 13:33:05 claudio Exp $ */ +/* $OpenBSD: vfs_syscalls.c,v 1.352 2021/07/16 07:59:38 claudio Exp $ */ /* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */ /* @@ -339,7 +339,6 @@ checkdirs(struct vnode *olddp) vref(newdp); fdp->fd_rdir = newdp; } - pr->ps_uvpcwd = NULL; } if (rootvnode == olddp) { free_count++; @@ -791,7 +790,6 @@ sys_chdir(struct proc *p, void *v, register_t *retval) nd.ni_unveil = UNVEIL_READ; if ((error = change_dir(&nd, p)) != 0) return (error); - p->p_p->ps_uvpcwd = nd.ni_unveil_match; old_cdir = fdp->fd_cdir; fdp->fd_cdir = nd.ni_vp; vrele(old_cdir); |