Fix bug 6878 - Cannot change ACL's inherit flag.
commitcdcd4da33e2d2f125ac3af89afc234ca941c2ba9
authorJeremy Allison <jra@samba.org>
Wed, 11 Nov 2009 20:17:47 +0000 (11 12:17 -0800)
committerJeremy Allison <jra@samba.org>
Wed, 11 Nov 2009 20:22:28 +0000 (11 12:22 -0800)
tree6486b929ad925522d6e9ce1ddce24e2e61ccaf35
parent2bef1fd0ef59bbb3d52c1fb475842ae3ca55308a
Fix bug 6878 - Cannot change ACL's inherit flag.
Based on a patch submitted by Tsukasa Hamano <hamano@osstech.co.jp>,
this is a change in the POSIX ACL mapping to deal with the lossy
mapping for directory ACE entries:

 We have a lossy mapping: directory ACE entries
 CREATOR_OWNER ------\
     (map to)         +---> SMB_ACL_USER_OBJ
 owning sid    ------/

 CREATOR_GROUP ------\
     (map to)         +---> SMB_ACL_GROUP_OBJ
 primary group sid --/

 on set. And on read of a directory ACL

 SMB_ACL_USER_OBJ ----> CREATOR_OWNER
 SMB_ACL_GROUP_OBJ ---> CREATOR_GROUP.

 Deal with this on set by duplicating
 owning sid and primary group sid ACE
 entries into the directory ACL.

Jeremy.
(cherry picked from commit 8995d3d813978a00b50f33943c60784ddfe308bf)
source3/smbd/posix_acls.c