diff options
author | 2015-11-14 22:23:22 +0000 | |
---|---|---|
committer | 2015-11-14 22:23:22 +0000 | |
commit | 301808e4ac77d4eb0414f96bdfb8977aec74f118 (patch) | |
tree | fd84d6a059e85b3f39700896fce2a688e330c26e | |
parent | Split the non-syscall ASM bits from SYS.h into DEFS.h and use that in the (diff) | |
download | wireguard-openbsd-301808e4ac77d4eb0414f96bdfb8977aec74f118.tar.xz wireguard-openbsd-301808e4ac77d4eb0414f96bdfb8977aec74f118.zip |
Add pathconf() to pledge "rpath"; ok guenther
-rw-r--r-- | sys/kern/kern_pledge.c | 3 | ||||
-rw-r--r-- | sys/kern/vfs_syscalls.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c index 769013d5f14..44a8f90d0cf 100644 --- a/sys/kern/kern_pledge.c +++ b/sys/kern/kern_pledge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_pledge.c,v 1.108 2015/11/14 07:02:23 deraadt Exp $ */ +/* $OpenBSD: kern_pledge.c,v 1.109 2015/11/14 22:23:22 deraadt Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org> @@ -279,6 +279,7 @@ const u_int pledge_syscalls[SYS_MAXSYSCALL] = { [SYS_getfsstat] = PLEDGE_RPATH, [SYS_statfs] = PLEDGE_RPATH, [SYS_fstatfs] = PLEDGE_RPATH, + [SYS_pathconf] = PLEDGE_RPATH, [SYS_utimes] = PLEDGE_FATTR, [SYS_futimes] = PLEDGE_FATTR, diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 49bc5921ece..12c4a9942c8 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_syscalls.c,v 1.239 2015/11/02 16:31:55 semarie Exp $ */ +/* $OpenBSD: vfs_syscalls.c,v 1.240 2015/11/14 22:23:22 deraadt Exp $ */ /* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */ /* @@ -1796,6 +1796,7 @@ sys_pathconf(struct proc *p, void *v, register_t *retval) NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, SCARG(uap, path), p); + nd.ni_pledge = PLEDGE_RPATH; if ((error = namei(&nd)) != 0) return (error); error = VOP_PATHCONF(nd.ni_vp, SCARG(uap, name), retval); |