summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-09-10 16:22:51 -0700
committerJeremy Allison <jra@samba.org>2008-09-10 16:22:51 -0700
commit5f3160ce274cbe1832155012caaa90ccc77459f6 (patch)
tree62ec6146d36b5dc7f33f857b178fea5f29ad2665 /source3/smbd
parent272134b759c26127e25a189a77d61af32de63111 (diff)
downloadsamba-5f3160ce274cbe1832155012caaa90ccc77459f6.tar.gz
samba-5f3160ce274cbe1832155012caaa90ccc77459f6.tar.bz2
samba-5f3160ce274cbe1832155012caaa90ccc77459f6.zip
Fix bug #5052 - not work cancel inheritance on share. We were
using the parent security descriptor type and flags instead of using the passed in SD. Jeremy. (This used to be commit 0d824d7188518aaa7b4e890885e6bc42e94397c5)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/posix_acls.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index 427cfc9a0d..7479aea076 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -3398,10 +3398,17 @@ static NTSTATUS append_parent_acl(files_struct *fsp,
parent_name));
}
- parent_sd->dacl->aces = new_ace;
- parent_sd->dacl->num_aces = i;
+ /* This sucks. psd should be const and we should
+ * be doing a deep-copy here. We're getting away
+ * with is as we know parent_sd is talloced off
+ * talloc_tos() as well as psd. JRA. */
- *pp_new_sd = parent_sd;
+ psd->dacl->aces = new_ace;
+ psd->dacl->num_aces = i;
+ psd->type &= ~(SE_DESC_DACL_AUTO_INHERITED|
+ SE_DESC_DACL_AUTO_INHERIT_REQ);
+
+ *pp_new_sd = psd;
return status;
}