summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Pierre André <jpandre@users.sourceforge.net>2012-08-22 10:00:22 +0200
committerJean-Pierre André <jpandre@users.sourceforge.net>2012-08-22 10:00:22 +0200
commit5a87bb24c96c77ef97004ac016db45e8aebfe7da (patch)
tree70cf608e8b78b5e783345c06b0abd5345780c651
parentd4b3c998c04514bdef03e97c5885430165254874 (diff)
downloadillumos-fusefs-5a87bb24c96c77ef97004ac016db45e8aebfe7da.tar.gz
Rejected the creation with O_EXCL of an existing file
-rw-r--r--kernel/fuse_vnops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/fuse_vnops.c b/kernel/fuse_vnops.c
index f407547..47bf031 100644
--- a/kernel/fuse_vnops.c
+++ b/kernel/fuse_vnops.c
@@ -2318,7 +2318,8 @@ fuse_create(struct vnode *dvp, char *nm, struct vattr *vap, vcexcl_t excl,
if (*vpp)
VN_RELE(*vpp);
if (!lku) {
- return (0);
+ /* Cannot create an existing file with O_EXCL */
+ return (excl ? EEXIST : 0);
}
/*