summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-11-25 16:12:39 +1100
committerAndrew Bartlett <abartlet@samba.org>2010-11-26 08:50:42 +1100
commit885ecd7b6b567a50067c9d3298e67c6e0f85b82a (patch)
tree3347f148b8c32a5dbc4d2a675d43f8bffc7d7199 /source4/dsdb
parentfad57d8ad05cf6175c87db33a404aff205adddaf (diff)
downloadsamba-885ecd7b6b567a50067c9d3298e67c6e0f85b82a.tar.gz
samba-885ecd7b6b567a50067c9d3298e67c6e0f85b82a.tar.bz2
samba-885ecd7b6b567a50067c9d3298e67c6e0f85b82a.zip
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
Diffstat (limited to 'source4/dsdb')
-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);