From 1efef4a19f4bb7990d47ab5403d7b4fde60f8013 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 22 Sep 2004 13:08:30 +0000 Subject: 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) --- source4/ldap_server/ldap_server.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'source4/ldap_server') 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; } -- cgit