summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/nssldb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-11-15 16:09:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:28:13 -0500
commitc046f2e7a35e2cef2c1482f7d6a3f16be45b49d4 (patch)
tree1df703df31a91e4b2ab398853894ceb1ddae2aeb /source4/lib/ldb/nssldb
parenta39db6303060466ab82366ac9395a6b5a9ca4627 (diff)
downloadsamba-c046f2e7a35e2cef2c1482f7d6a3f16be45b49d4.tar.gz
samba-c046f2e7a35e2cef2c1482f7d6a3f16be45b49d4.tar.bz2
samba-c046f2e7a35e2cef2c1482f7d6a3f16be45b49d4.zip
r19720: - don't pass a pointer reference to ldb_search_default_callback()
as it's ugly when it free's the callers memory on failure! - only steal the controls on a LDB_REPLY_EXTENDED, LDB_REPLY_DONE and ignore them on LDB_REPLY_ENTRY, LDB_REPLY_REFERRAL as we currently have not way to return them in a ldb_result (we should fix this!) metze (This used to be commit 47da62b15abf48f97ce6fc8dc4627792728349ae)
Diffstat (limited to 'source4/lib/ldb/nssldb')
-rw-r--r--source4/lib/ldb/nssldb/ldb-nss.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/lib/ldb/nssldb/ldb-nss.c b/source4/lib/ldb/nssldb/ldb-nss.c
index 3206f38a10..614f6e170f 100644
--- a/source4/lib/ldb/nssldb/ldb-nss.c
+++ b/source4/lib/ldb/nssldb/ldb-nss.c
@@ -336,7 +336,7 @@ done:
#define _LDB_NSS_ALLOC_CHECK(mem) do { if (!mem) { errno = ENOMEM; return NSS_STATUS_UNAVAIL; } } while(0)
-NSS_STATUS _ldb_nss_group_request(struct ldb_result **res,
+NSS_STATUS _ldb_nss_group_request(struct ldb_result **_res,
struct ldb_dn *group_dn,
const char * const *attrs,
const char *mattr)
@@ -346,8 +346,9 @@ NSS_STATUS _ldb_nss_group_request(struct ldb_result **res,
struct ldb_asq_control *asqc;
struct ldb_request *req;
int ret;
+ struct ldb_result *res = *_res;
- ctrls = talloc_array(*res, struct ldb_control *, 2);
+ ctrls = talloc_array(res, struct ldb_control *, 2);
_LDB_NSS_ALLOC_CHECK(ctrls);
ctrl = talloc(ctrls, struct ldb_control);
@@ -370,7 +371,7 @@ NSS_STATUS _ldb_nss_group_request(struct ldb_result **res,
ret = ldb_build_search_req(
&req,
_ldb_nss_ctx->ldb,
- *res,
+ res,
group_dn,
LDB_SCOPE_BASE,
"(objectClass=*)",