summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2016-05-27 16:33:56 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2016-05-27 16:33:56 +0000
commit6bcfef3b4ec1ffe500774bb0d2001adab1d2e814 (patch)
tree97695bca0469cab142b2e850b9a0313610be3c54 /sys/kern
parentd85559504400d249c46879ea158daacf28616728 (diff)
rename(2) operation requires "rpath cpath" at the underlying operation
(the src path lookup is considered a rpath operation) noticed by kristaps, discussed with semarie
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_pledge.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c
index 4284c4bd5c7..887f461fe00 100644
--- a/sys/kern/kern_pledge.c
+++ b/sys/kern/kern_pledge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_pledge.c,v 1.166 2016/05/15 05:04:28 semarie Exp $ */
+/* $OpenBSD: kern_pledge.c,v 1.167 2016/05/27 16:33:55 deraadt Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -295,7 +295,7 @@ const uint64_t pledge_syscalls[SYS_MAXSYSCALL] = {
[SYS_readlinkat] = PLEDGE_RPATH | PLEDGE_WPATH,
[SYS_lstat] = PLEDGE_RPATH | PLEDGE_WPATH | PLEDGE_TMPPATH,
[SYS_truncate] = PLEDGE_WPATH,
- [SYS_rename] = PLEDGE_CPATH,
+ [SYS_rename] = PLEDGE_RPATH | PLEDGE_CPATH,
[SYS_rmdir] = PLEDGE_CPATH,
[SYS_renameat] = PLEDGE_CPATH,
[SYS_link] = PLEDGE_CPATH,