From 500d5523d2a83234d6bfbf264d78293426488bfc Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 2 Jan 2005 07:51:13 +0000 Subject: r4475: fixed smbd to work with the small changes in the ldb API (the most important change was in the ldb_msg_add_*() routines, which now use the msg as a context, and thus it needs to be a talloc ptr) (This used to be commit 1a4713bfd0e519f3eb7b3241121ff914a6eeef18) --- source4/ldap_server/ldap_rootdse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/ldap_server/ldap_rootdse.c') diff --git a/source4/ldap_server/ldap_rootdse.c b/source4/ldap_server/ldap_rootdse.c index fecb82ec4a..71c81ac822 100644 --- a/source4/ldap_server/ldap_rootdse.c +++ b/source4/ldap_server/ldap_rootdse.c @@ -309,7 +309,7 @@ static NTSTATUS rootdse_Search(struct ldapsrv_partition *partition, struct ldaps void *local_ctx; struct ldap_SearchResEntry *ent; struct ldap_Result *done; - struct ldb_message **res; + struct ldb_message **res = NULL; int result = LDAP_SUCCESS; struct ldapsrv_reply *ent_r, *done_r; struct rootdse_db_context *rootdsedb; @@ -338,8 +338,8 @@ static NTSTATUS rootdse_Search(struct ldapsrv_partition *partition, struct ldaps attrs[j] = NULL; } - ldb_set_alloc(rootdsedb->ldb, talloc_realloc_fn, rootdsedb); count = ldb_search(rootdsedb->ldb, "", 0, "dn=cn=rootDSE", attrs, &res); + talloc_steal(rootdsedb, res); if (count == 1) { ent_r = ldapsrv_init_reply(call, LDAP_TAG_SearchResultEntry); -- cgit