summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerb Lewis <herb@samba.org>2001-08-30 18:56:35 +0000
committerHerb Lewis <herb@samba.org>2001-08-30 18:56:35 +0000
commite555b969b2201bdb48ad9a0fc79f1e13ea25ec24 (patch)
treed625caa6615b3a797fb77a3291447c3914d5893d
parent3bd7e65cac84b6d0a22936addbd6e30617c84567 (diff)
downloadsamba-e555b969b2201bdb48ad9a0fc79f1e13ea25ec24.tar.gz
samba-e555b969b2201bdb48ad9a0fc79f1e13ea25ec24.tar.bz2
samba-e555b969b2201bdb48ad9a0fc79f1e13ea25ec24.zip
if no ACL elements then use chmod - fixes ability to set read-only bit
on files that do not have an ACL (This used to be commit 65ea13420c78cf0a8c01f14c08815e4b44ca4abc)
-rw-r--r--source3/smbd/posix_acls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index b87605ee07..39d0b83bf6 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -2213,11 +2213,11 @@ static int chmod_acl_internals( SMB_ACL_T posix_acl, mode_t mode)
}
/*
- * If this is a simple 3 element ACL then it's a standard
+ * If this is a simple 3 element ACL or no elements then it's a standard
* UNIX permission set. Just use chmod...
*/
- if (num_entries == 3)
+ if ((num_entries == 3) || (num_entries == 0))
return -1;
return 0;