diff options
author | Jeremy Allison <jra@samba.org> | 2010-01-12 16:04:44 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2010-01-12 16:04:44 -0800 |
commit | 47c1d9b39f292772e8d8f7a737ddff6c8bdfdeae (patch) | |
tree | a032c194ae17b0634df31def0b125fc4db894f2e /source3/smbd/posix_acls.c | |
parent | 2f30aea3324f32f9b8555e961256fc1280da2871 (diff) | |
download | samba-47c1d9b39f292772e8d8f7a737ddff6c8bdfdeae.tar.gz samba-47c1d9b39f292772e8d8f7a737ddff6c8bdfdeae.tar.bz2 samba-47c1d9b39f292772e8d8f7a737ddff6c8bdfdeae.zip |
Fix bug #6876 - Delete of an object whose parent folder does not have delete rights fails even if the delete right is set on the object.
Final fix for the vfs_acl_xattr and vfs_acl_tdb code.
Ensure we can delete a file even if the underlying POSIX
permissions don't allow it, if the Windows permissions do.
Jeremy.
Diffstat (limited to 'source3/smbd/posix_acls.c')
-rw-r--r-- | source3/smbd/posix_acls.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index 8d66bf1059..7342420a89 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -1107,9 +1107,10 @@ uint32_t map_canon_ace_perms(int snum, nt_mask |= ((perms & S_IWUSR) ? UNIX_ACCESS_W : 0 ); nt_mask |= ((perms & S_IXUSR) ? UNIX_ACCESS_X : 0 ); } - if ((perms & S_IWUSR) && lp_dos_filemode(snum)) { - nt_mask |= (SEC_STD_WRITE_DAC|SEC_STD_WRITE_OWNER); - } + } + + if ((perms & S_IWUSR) && lp_dos_filemode(snum)) { + nt_mask |= (SEC_STD_WRITE_DAC|SEC_STD_WRITE_OWNER|DELETE_ACCESS); } DEBUG(10,("map_canon_ace_perms: Mapped (UNIX) %x to (NT) %x\n", |