Hi, with this patch the extdom plugin will properly indicate to a client if the search object does not exist instead of returning a generic error. This is important for the client to act accordingly and improve debugging possibilities.
bye, Sumit
From 3895fa21524efc3a22bfb36b1a9aa34277b8dd46 Mon Sep 17 00:00:00 2001 From: Sumit Bose <sb...@redhat.com> Date: Wed, 4 Mar 2015 13:39:04 +0100 Subject: [PATCH] extdom: return LDAP_NO_SUCH_OBJECT to the client --- daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c b/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c index a70ed20f1816a7e00385edae8a81dd5dad9e9362..a040f2beba073d856053429face2f464347b2524 100644 --- a/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c +++ b/daemons/ipa-slapi-plugins/ipa-extdom-extop/ipa_extdom_extop.c @@ -123,8 +123,12 @@ static int ipa_extdom_extop(Slapi_PBlock *pb) ret = handle_request(ctx, req, &ret_val); if (ret != LDAP_SUCCESS) { - rc = LDAP_OPERATIONS_ERROR; - err_msg = "Failed to handle the request.\n"; + if (ret == LDAP_NO_SUCH_OBJECT) { + rc = LDAP_NO_SUCH_OBJECT; + } else { + rc = LDAP_OPERATIONS_ERROR; + err_msg = "Failed to handle the request.\n"; + } goto done; } -- 2.1.0
_______________________________________________ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel