summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2019-07-29 12:35:19 +0000
committerbluhm <bluhm@openbsd.org>2019-07-29 12:35:19 +0000
commitfea0e205cc02944db66c7778ea1e6c29b6821bd9 (patch)
treeadfe671c4eb406c686010a260c0a5c6bddbd3c41
parentShut down queues properly when bringing the interface down (diff)
downloadwireguard-openbsd-fea0e205cc02944db66c7778ea1e6c29b6821bd9.tar.xz
wireguard-openbsd-fea0e205cc02944db66c7778ea1e6c29b6821bd9.zip
When setting immutable flags on directories with chflags(1), calling
unveil(2) on a nonexisting file failed. Ignore files that cannot be created due to permissions. OK deraadt@
-rw-r--r--sys/kern/vfs_lookup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c
index 59a78578e1b..933ca2b0279 100644
--- a/sys/kern/vfs_lookup.c
+++ b/sys/kern/vfs_lookup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_lookup.c,v 1.81 2019/07/27 21:15:35 bluhm Exp $ */
+/* $OpenBSD: vfs_lookup.c,v 1.82 2019/07/29 12:35:19 bluhm Exp $ */
/* $NetBSD: vfs_lookup.c,v 1.17 1996/02/09 19:00:59 christos Exp $ */
/*
@@ -577,7 +577,7 @@ dirloop:
* create ourselves.
*/
if (ndp->ni_pledge == PLEDGE_UNVEIL &&
- (error == EACCES || error == EROFS))
+ (error == EPERM || error == EACCES || error == EROFS))
error = EJUSTRETURN;
if (error != EJUSTRETURN)