diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-11-14 22:23:23 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-11-14 22:23:23 +0000 |
commit | d4538dcaed5e86e2abe80cae56e9ced1a0717c29 (patch) | |
tree | 884ea62e4681e0607e853dadf0d8529bb7049d9a | |
parent | 8ced3373b2371c49ada7379cc96f449ca67ec9e9 (diff) |
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); |