diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-09-22 13:08:30 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:59:02 -0500 |
commit | 1efef4a19f4bb7990d47ab5403d7b4fde60f8013 (patch) | |
tree | 308ff3791cb084d253975e5aa2706906ebd51213 | |
parent | d3fc90eaa185a15f2bd7fca11663e898feb2c81c (diff) | |
download | samba-1efef4a19f4bb7990d47ab5403d7b4fde60f8013.tar.gz samba-1efef4a19f4bb7990d47ab5403d7b4fde60f8013.tar.bz2 samba-1efef4a19f4bb7990d47ab5403d7b4fde60f8013.zip |
r2525: fix a search response when the backend didn't support Search
we return LDAP error 32 (noSuchObject) now instead of a protocol error
metze
(This used to be commit f9dc34cd0b5e5e05e5ca6b034a7056b34053c4d0)
-rw-r--r-- | source4/ldap_server/ldap_server.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c index f4ebd0d74c..bb52a1bbb3 100644 --- a/source4/ldap_server/ldap_server.c +++ b/source4/ldap_server/ldap_server.c @@ -279,7 +279,22 @@ static void ldapsrv_SearchRequest(struct ldapsrv_call *call) part = ldapsrv_get_partition(call->conn, req->basedn); if (!part->ops->Search) { - ldapsrv_unwilling(call, 2); + struct ldap_Result *done; + struct ldapsrv_reply *done_r; + + done_r = ldapsrv_init_reply(call, LDAP_TAG_SearchResultDone); + if (!done_r) { + ldapsrv_terminate_connection(call->conn, "ldapsrv_init_reply() failed"); + return; + } + + done = &done_r->msg.r.SearchResultDone; + done->resultcode = 32; + done->dn = NULL; + done->errormessage = NULL; + done->referral = NULL; + + ldapsrv_queue_reply(call, done_r); return; } |