1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-01 16:23:49 +03:00

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 commit is contained in:
Stefan Metzmacher
2006-11-15 16:09:36 +00:00
committed by Gerald (Jerry) Carter
parent 7a4f46c1c9
commit 47da62b15a
2 changed files with 18 additions and 16 deletions

View File

@@ -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=*)",