--- smbd/posix_acls.c.orig 2008-08-26 01:09:21.000000000 +0400 +++ smbd/posix_acls.c 2008-09-11 09:00:41.000000000 +0400 @@ -3300,10 +3300,17 @@ } - 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. */ + + 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 = parent_sd; + *pp_new_sd = psd; return status; }