summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/acl_read.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/util.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/acl_read.c b/source4/dsdb/samdb/ldb_modules/acl_read.c
index 401e0dc318..3a0f6f34eb 100644
--- a/source4/dsdb/samdb/ldb_modules/acl_read.c
+++ b/source4/dsdb/samdb/ldb_modules/acl_read.c
@@ -226,7 +226,7 @@ static int aclread_search(struct ldb_module *module, struct ldb_request *req)
session_info = (struct auth_session_info *)ldb_get_opaque(ldb, "sessionInfo");
if (session_info && security_token_is_anonymous(session_info->security_token)) {
- block_anonymous = dsdb_block_anonymous_ops(module, req);
+ block_anonymous = dsdb_block_anonymous_ops(module);
if (block_anonymous) {
return ldb_error(ldb, LDB_ERR_OPERATIONS_ERROR,
"This request is not allowed to an anonymous connection.");
diff --git a/source4/dsdb/samdb/ldb_modules/util.c b/source4/dsdb/samdb/ldb_modules/util.c
index 01d7347d3e..9608b061c4 100644
--- a/source4/dsdb/samdb/ldb_modules/util.c
+++ b/source4/dsdb/samdb/ldb_modules/util.c
@@ -1080,10 +1080,9 @@ const struct ldb_val *dsdb_module_find_dsheuristics(struct ldb_module *module,
return NULL;
}
-bool dsdb_block_anonymous_ops(struct ldb_module *module,
- TALLOC_CTX *mem_ctx)
+bool dsdb_block_anonymous_ops(struct ldb_module *module)
{
- TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
+ TALLOC_CTX *tmp_ctx = talloc_new(module);
bool result;
const struct ldb_val *hr_val = dsdb_module_find_dsheuristics(module,
tmp_ctx);