diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-09-22 14:16:42 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:59:02 -0500 |
commit | 9a7c87bb645d908fab4527824376e328f4f3b0e0 (patch) | |
tree | bdd3287265792aba2953cee9204142fc59b01ccb /source4/ldap_server/ldap_rootdse.c | |
parent | 0c7a18525cc662d4552e20796404a21ed9debcd5 (diff) | |
download | samba-9a7c87bb645d908fab4527824376e328f4f3b0e0.tar.gz samba-9a7c87bb645d908fab4527824376e328f4f3b0e0.tar.xz samba-9a7c87bb645d908fab4527824376e328f4f3b0e0.zip |
r2527: - add a dummy for a simple ldb backend
- handle the complete rootDSE search (maybe this will be also a partition module)
metze
(This used to be commit 6fc904a71cf5305d0c5c260ad1665499ea6c6f9a)
Diffstat (limited to 'source4/ldap_server/ldap_rootdse.c')
-rw-r--r-- | source4/ldap_server/ldap_rootdse.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source4/ldap_server/ldap_rootdse.c b/source4/ldap_server/ldap_rootdse.c index 75e641648b..b1d889e830 100644 --- a/source4/ldap_server/ldap_rootdse.c +++ b/source4/ldap_server/ldap_rootdse.c @@ -32,12 +32,18 @@ void ldapsrv_RootDSE_Search(struct ldapsrv_call *call, { struct ldap_SearchResEntry *ent; struct ldap_Result *done; + int code = 0; struct ldapsrv_reply *ent_r, *done_r; int num_attrs = 3; struct ldap_attribute *attrs; DEBUG(10, ("Root DSE: %s\n", r->filter)); + if (r->scope != LDAP_SEARCH_SCOPE_BASE) { + code = 32; /* nosuchobject */ + goto no_base_scope; + } + attrs = talloc_array_p(call, struct ldap_attribute, num_attrs); if (!attrs) { ldapsrv_terminate_connection(call->conn, "no memory"); @@ -233,6 +239,8 @@ void ldapsrv_RootDSE_Search(struct ldapsrv_call *call, ldapsrv_queue_reply(call, ent_r); +no_base_scope: + done_r = ldapsrv_init_reply(call, LDAP_TAG_SearchResultDone); if (!done_r) { ldapsrv_terminate_connection(call->conn, "ldapsrv_init_reply() failed"); @@ -240,7 +248,7 @@ void ldapsrv_RootDSE_Search(struct ldapsrv_call *call, } done = &done_r->msg.r.SearchResultDone; - done->resultcode = 0; + done->resultcode = code; done->dn = NULL; done->errormessage = NULL; done->referral = NULL; |