diff options
author | 2018-08-13 20:36:35 +0000 | |
---|---|---|
committer | 2018-08-13 20:36:35 +0000 | |
commit | e22652ae7fdc274afc3c31720dc23ed9510c99f2 (patch) | |
tree | 5a9e2dc915e7a9dbf4e7e96c3acc13b047efe0b1 | |
parent | The first panic in pledge_namei should only be for ni_pledge == 0 (diff) | |
download | wireguard-openbsd-e22652ae7fdc274afc3c31720dc23ed9510c99f2.tar.xz wireguard-openbsd-e22652ae7fdc274afc3c31720dc23ed9510c99f2.zip |
in sys_statfs(), BYPASSUNVEIL can be passed to NDINIT in the "flags"
argument, rather than manually |= afterwards. Observed by semarie
-rw-r--r-- | sys/kern/vfs_syscalls.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 6598f81e667..266b68ed6a3 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_syscalls.c,v 1.302 2018/08/11 16:16:07 beck Exp $ */ +/* $OpenBSD: vfs_syscalls.c,v 1.303 2018/08/13 20:36:35 deraadt Exp $ */ /* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */ /* @@ -636,10 +636,10 @@ sys_statfs(struct proc *p, void *v, register_t *retval) int error; struct nameidata nd; - NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, SCARG(uap, path), p); + NDINIT(&nd, LOOKUP, FOLLOW | BYPASSUNVEIL, UIO_USERSPACE, + SCARG(uap, path), p); nd.ni_pledge = PLEDGE_RPATH; nd.ni_unveil = UNVEIL_READ; - nd.ni_cnd.cn_flags |= BYPASSUNVEIL; if ((error = namei(&nd)) != 0) return (error); mp = nd.ni_vp->v_mount; |