summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatoliy Atanasov <anatoliy.atanasov@postpath.com>2010-06-01 15:05:02 +0300
committerAnatoliy Atanasov <anatoliy.atanasov@postpath.com>2010-06-01 16:52:46 +0300
commit3bae05d286b54ccb8c4d624c7f305bd84138c454 (patch)
treed8308e863e7bfe0013a6935c515995f507668684
parentda894b7023327ffaf533ec9de1b7cb2a199fe28c (diff)
downloadsamba-3bae05d286b54ccb8c4d624c7f305bd84138c454.tar.gz
s4: check the sacl and dacl pointers on the old sd
-rw-r--r--source4/dsdb/samdb/ldb_modules/descriptor.c4
1 files changed, 2 insertions, 2 deletions
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 |