summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2018-05-10 12:29:35 +0200
committerJeremy Allison <jra@samba.org>2018-05-11 23:30:31 +0200
commitced55850034a3653525823bf9623912a4fcf18a0 (patch)
tree58f557a5c15bac1d5e8187df8b24c91ca699a7ca /source3/modules
parent12f6d56c4814fca64e0e3c636018e70d71ad0be5 (diff)
downloadsamba-ced55850034a3653525823bf9623912a4fcf18a0.tar.gz
s3:smbd: fix interaction between chown and SD flags
A change ownership operation that doesn't set the NT ACLs must not touch the SD flags (type). Bug: https://bugzilla.samba.org/show_bug.cgi?id=13432 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri May 11 23:30:32 CEST 2018 on sn-devel-144
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_acl_common.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index b323079d08a..5b2b2ef60e3 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -942,8 +942,11 @@ NTSTATUS fset_nt_acl_common(
}
psd->revision = orig_psd->revision;
- /* All our SD's are self relative. */
- psd->type = orig_psd->type | SEC_DESC_SELF_RELATIVE;
+ if (security_info_sent & SECINFO_DACL) {
+ psd->type = orig_psd->type;
+ /* All our SD's are self relative. */
+ psd->type |= SEC_DESC_SELF_RELATIVE;
+ }
if ((security_info_sent & SECINFO_OWNER) && (orig_psd->owner_sid != NULL)) {
if (!dom_sid_equal(orig_psd->owner_sid, psd->owner_sid)) {