From 885ecd7b6b567a50067c9d3298e67c6e0f85b82a Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 25 Nov 2010 16:12:39 +1100 Subject: s4-dsdb Remove mem_ctx argument from dsdb_module_find_dsheuristics(). A function that does not return memory should not take a memory context. Andrew Bartlett --- source4/dsdb/samdb/ldb_modules/acl_read.c | 2 +- source4/dsdb/samdb/ldb_modules/util.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'source4/dsdb/samdb') 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); -- cgit