summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/common/dsdb_access.c5
-rw-r--r--source4/dsdb/samdb/ldb_modules/acl_util.c16
2 files changed, 10 insertions, 11 deletions
diff --git a/source4/dsdb/common/dsdb_access.c b/source4/dsdb/common/dsdb_access.c
index fd75e77541..6af5c3ae87 100644
--- a/source4/dsdb/common/dsdb_access.c
+++ b/source4/dsdb/common/dsdb_access.c
@@ -93,7 +93,6 @@ int dsdb_check_access_on_dn_internal(struct ldb_context *ldb,
struct security_descriptor *sd = NULL;
struct dom_sid *sid = NULL;
struct object_tree *root = NULL;
- struct object_tree *new_node = NULL;
NTSTATUS status;
uint32_t access_granted;
int ret;
@@ -108,8 +107,8 @@ int dsdb_check_access_on_dn_internal(struct ldb_context *ldb,
}
sid = samdb_result_dom_sid(mem_ctx, acl_res->msgs[0], "objectSid");
if (guid) {
- if (!insert_in_object_tree(mem_ctx, guid, access_mask, &root,
- &new_node)) {
+ if (!insert_in_object_tree(mem_ctx, guid, access_mask, NULL,
+ &root)) {
return ldb_operr(ldb);
}
}
diff --git a/source4/dsdb/samdb/ldb_modules/acl_util.c b/source4/dsdb/samdb/ldb_modules/acl_util.c
index 09ca201d94..795a39cba4 100644
--- a/source4/dsdb/samdb/ldb_modules/acl_util.c
+++ b/source4/dsdb/samdb/ldb_modules/acl_util.c
@@ -109,16 +109,17 @@ int acl_check_access_on_attribute(struct ldb_module *module,
if (!insert_in_object_tree(tmp_ctx,
&objectclass->schemaIDGUID,
- access_mask, &root,
- &new_node)) {
+ access_mask, NULL,
+ &root)) {
DEBUG(10, ("acl_search: cannot add to object tree class schemaIDGUID\n"));
goto fail;
}
+ new_node = root;
if (!GUID_all_zero(&attr->attributeSecurityGUID)) {
if (!insert_in_object_tree(tmp_ctx,
&attr->attributeSecurityGUID,
- access_mask, &new_node,
+ access_mask, new_node,
&new_node)) {
DEBUG(10, ("acl_search: cannot add to object tree securityGUID\n"));
goto fail;
@@ -127,7 +128,7 @@ int acl_check_access_on_attribute(struct ldb_module *module,
if (!insert_in_object_tree(tmp_ctx,
&attr->schemaIDGUID,
- access_mask, &new_node,
+ access_mask, new_node,
&new_node)) {
DEBUG(10, ("acl_search: cannot add to object tree attributeGUID\n"));
goto fail;
@@ -162,14 +163,13 @@ int acl_check_access_on_objectclass(struct ldb_module *module,
NTSTATUS status;
uint32_t access_granted;
struct object_tree *root = NULL;
- struct object_tree *new_node = NULL;
TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
struct security_token *token = acl_user_token(module);
if (!insert_in_object_tree(tmp_ctx,
&objectclass->schemaIDGUID,
- access_mask, &root,
- &new_node)) {
+ access_mask, NULL,
+ &root)) {
DEBUG(10, ("acl_search: cannot add to object tree class schemaIDGUID\n"));
goto fail;
}
@@ -209,7 +209,7 @@ int acl_check_extended_right(TALLOC_CTX *mem_ctx,
GUID_from_string(ext_right, &right);
if (!insert_in_object_tree(tmp_ctx, &right, right_type,
- &root, &new_node)) {
+ NULL, &root)) {
DEBUG(10, ("acl_ext_right: cannot add to object tree\n"));
talloc_free(tmp_ctx);
return LDB_ERR_OPERATIONS_ERROR;