From 3bae05d286b54ccb8c4d624c7f305bd84138c454 Mon Sep 17 00:00:00 2001 From: Anatoliy Atanasov Date: Tue, 1 Jun 2010 15:05:02 +0300 Subject: s4: check the sacl and dacl pointers on the old sd --- source4/dsdb/samdb/ldb_modules/descriptor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/dsdb/samdb/ldb_modules/descriptor.c') diff --git a/source4/dsdb/samdb/ldb_modules/descriptor.c b/source4/dsdb/samdb/ldb_modules/descriptor.c index 6c9baaa13a..cfab5a0f9a 100644 --- a/source4/dsdb/samdb/ldb_modules/descriptor.c +++ b/source4/dsdb/samdb/ldb_modules/descriptor.c @@ -176,7 +176,7 @@ static struct security_descriptor *descr_handle_sd_flags(TALLOC_CTX *mem_ctx, SEC_DESC_SACL_AUTO_INHERITED|SEC_DESC_SACL_PROTECTED | SEC_DESC_SERVER_SECURITY); } - else if (old_sd) { + else if (old_sd && old_sd->sacl) { final_sd->sacl = security_acl_dup(mem_ctx,old_sd->sacl); final_sd->type |= old_sd->type & (SEC_DESC_SACL_PRESENT | SEC_DESC_SACL_DEFAULTED|SEC_DESC_SACL_AUTO_INHERIT_REQ | @@ -191,7 +191,7 @@ static struct security_descriptor *descr_handle_sd_flags(TALLOC_CTX *mem_ctx, SEC_DESC_DACL_AUTO_INHERITED|SEC_DESC_DACL_PROTECTED | SEC_DESC_DACL_TRUSTED); } - else if (old_sd) { + else if (old_sd && old_sd->dacl) { final_sd->dacl = security_acl_dup(mem_ctx,old_sd->dacl); final_sd->type |= old_sd->type & (SEC_DESC_DACL_PRESENT | SEC_DESC_DACL_DEFAULTED|SEC_DESC_DACL_AUTO_INHERIT_REQ | -- cgit