summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2019-07-29 12:35:20 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2019-07-29 12:35:20 +0000
commit066c099230e6d90ed43206033e7ba5c22f754007 (patch)
tree7ce1623fca3cc8d5ddbe57e72048b6228e6695ef
parenta67ab9691d856a45a8283f0e50efff2eb474d424 (diff)
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)