diff options
author | Jeremy Allison <jra@samba.org> | 2008-10-08 15:18:25 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-10-08 15:18:25 -0700 |
commit | 646df8bec618d78905f83779bf57d96141109d8f (patch) | |
tree | 2259dfa1675a0a3ef781bc07fd09a42b68f0aff7 /source3/modules | |
parent | 14f835ba4b7e553d0cd75f3b311378c5c875e87c (diff) | |
download | samba-646df8bec618d78905f83779bf57d96141109d8f.tar.gz samba-646df8bec618d78905f83779bf57d96141109d8f.tar.bz2 samba-646df8bec618d78905f83779bf57d96141109d8f.zip |
Deal with inheritance from parent directory when setting Windows
ACLs.
Jeremy.
Diffstat (limited to 'source3/modules')
-rw-r--r-- | source3/modules/vfs_acl_xattr.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/modules/vfs_acl_xattr.c b/source3/modules/vfs_acl_xattr.c index 4a8f6fec01..b641195fd7 100644 --- a/source3/modules/vfs_acl_xattr.c +++ b/source3/modules/vfs_acl_xattr.c @@ -317,6 +317,22 @@ static NTSTATUS fset_nt_acl_xattr(vfs_handle_struct *handle, files_struct *fsp, return status; } + if ((security_info_sent & DACL_SECURITY_INFORMATION) && + psd->dacl != NULL && + (psd->type & (SE_DESC_DACL_AUTO_INHERITED| + SE_DESC_DACL_AUTO_INHERIT_REQ))== + (SE_DESC_DACL_AUTO_INHERITED| + SE_DESC_DACL_AUTO_INHERIT_REQ) ) { + SEC_DESC *new_psd = NULL; + status = append_parent_acl(fsp, psd, &new_psd); + if (!NT_STATUS_IS_OK(status)) { + /* Lower level acl set succeeded, + * so still return OK. */ + return NT_STATUS_OK; + } + psd = new_psd; + } + create_acl_blob(psd, &blob); store_acl_blob(fsp, &blob); |