diff options
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/descriptor.c')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/descriptor.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/descriptor.c b/source4/dsdb/samdb/ldb_modules/descriptor.c index 5b74c9c656..935069a00d 100644 --- a/source4/dsdb/samdb/ldb_modules/descriptor.c +++ b/source4/dsdb/samdb/ldb_modules/descriptor.c @@ -672,7 +672,6 @@ static int descriptor_do_add(struct descriptor_context *ac) struct ldb_request *add_req; struct ldb_message_element *objectclass_element, *sd_element = NULL; struct ldb_message *msg; - TALLOC_CTX *mem_ctx; int ret; DATA_BLOB *sd; const struct dsdb_class *objectclass; @@ -682,11 +681,6 @@ static int descriptor_do_add(struct descriptor_context *ac) ldb = ldb_module_get_ctx(ac->module); schema = dsdb_get_schema(ldb, ac); - mem_ctx = talloc_new(ac); - if (mem_ctx == NULL) { - return ldb_module_oom(ac->module); - } - switch (ac->req->operation) { case LDB_ADD: msg = ldb_msg_copy_shallow(ac, ac->req->op.add.message); @@ -738,7 +732,7 @@ static int descriptor_do_add(struct descriptor_context *ac) /* Get the parent descriptor and the one provided. If not * provided, get the default. Convert it to a security * descriptor and calculate the permissions. */ - sd = get_new_descriptor(ac->module, msg->dn, mem_ctx, objectclass, + sd = get_new_descriptor(ac->module, msg->dn, ac, objectclass, ac->parentsd_val, ac->sd_val, NULL, 0); if (ac->sd_val) { ldb_msg_remove_attr(msg, "nTSecurityDescriptor"); @@ -751,8 +745,6 @@ static int descriptor_do_add(struct descriptor_context *ac) } } - talloc_free(mem_ctx); - ret = ldb_build_add_req(&add_req, ldb, ac, msg, ac->req->controls, |