diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-06-15 00:27:51 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:18:12 -0500 |
commit | c0947b0d7f809f5139fbfcdbd618ed7b0a77d2be (patch) | |
tree | 7c0d7391b8f27d55e40b22f2c16315356e10a167 /source4/ldap_server/ldap_simple_ldb.c | |
parent | 74a3621089d4d1e9ba4c1a02e44247d1cff29200 (diff) | |
download | samba-c0947b0d7f809f5139fbfcdbd618ed7b0a77d2be.tar.gz samba-c0947b0d7f809f5139fbfcdbd618ed7b0a77d2be.tar.bz2 samba-c0947b0d7f809f5139fbfcdbd618ed7b0a77d2be.zip |
r7593: simplified the memory management in the ldap code. Having a mem_ctx
element in a structure is not necessary any more.
(This used to be commit 912d0427f52eac811b27bf7e385b0642f7dc7f53)
Diffstat (limited to 'source4/ldap_server/ldap_simple_ldb.c')
-rw-r--r-- | source4/ldap_server/ldap_simple_ldb.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/source4/ldap_server/ldap_simple_ldb.c b/source4/ldap_server/ldap_simple_ldb.c index d6b84a37ba..1106919891 100644 --- a/source4/ldap_server/ldap_simple_ldb.c +++ b/source4/ldap_server/ldap_simple_ldb.c @@ -90,6 +90,9 @@ static NTSTATUS sldb_Search(struct ldapsrv_partition *partition, struct ldapsrv_ attrs[i] = NULL; } + DEBUG(5,("ldb_search_bytree dn=%s filter=%s\n", + basedn->dn, ldb_filter_from_tree(call, r->tree))); + count = ldb_search_bytree(samdb, basedn->dn, scope, r->tree, attrs, &res); talloc_steal(samdb, res); @@ -97,7 +100,7 @@ static NTSTATUS sldb_Search(struct ldapsrv_partition *partition, struct ldapsrv_ ent_r = ldapsrv_init_reply(call, LDAP_TAG_SearchResultEntry); NT_STATUS_HAVE_NO_MEMORY(ent_r); - ent = &ent_r->msg.r.SearchResultEntry; + ent = &ent_r->msg->r.SearchResultEntry; ent->dn = talloc_steal(ent_r, res[i]->dn); ent->num_attributes = 0; ent->attributes = NULL; @@ -151,7 +154,7 @@ reply: } } - done = &done_r->msg.r.SearchResultDone; + done = &done_r->msg->r.SearchResultDone; done->dn = NULL; done->resultcode = result; done->errormessage = (errstr?talloc_strdup(done_r,errstr):NULL); @@ -250,7 +253,7 @@ reply: } } - add_result = &add_reply->msg.r.AddResponse; + add_result = &add_reply->msg->r.AddResponse; add_result->dn = NULL; add_result->resultcode = result; add_result->errormessage = (errstr?talloc_strdup(add_reply,errstr):NULL); @@ -302,7 +305,7 @@ reply: } } - del_result = &del_reply->msg.r.DelResponse; + del_result = &del_reply->msg->r.DelResponse; del_result->dn = NULL; del_result->resultcode = result; del_result->errormessage = (errstr?talloc_strdup(del_reply,errstr):NULL); @@ -412,7 +415,7 @@ reply: } } - modify_result = &modify_reply->msg.r.AddResponse; + modify_result = &modify_reply->msg->r.AddResponse; modify_result->dn = NULL; modify_result->resultcode = result; modify_result->errormessage = (errstr?talloc_strdup(modify_reply,errstr):NULL); @@ -481,7 +484,7 @@ reply: } } - compare = &compare_r->msg.r.CompareResponse; + compare = &compare_r->msg->r.CompareResponse; compare->dn = NULL; compare->resultcode = result; compare->errormessage = (errstr?talloc_strdup(compare_r,errstr):NULL); @@ -578,7 +581,7 @@ reply: } } - modifydn = &modifydn_r->msg.r.ModifyDNResponse; + modifydn = &modifydn_r->msg->r.ModifyDNResponse; modifydn->dn = NULL; modifydn->resultcode = result; modifydn->errormessage = (errstr?talloc_strdup(modifydn_r,errstr):NULL); |