dpward / rpms / sssd

Forked from rpms/sssd 3 years ago
Clone

Blame SOURCES/0012-ipa-improve-error-reporting-for-extdom-LDAP-exop.patch

905b4d
From de830a6c4b032ec21c2aad9f7b56fd80fe09817b Mon Sep 17 00:00:00 2001
905b4d
From: Sumit Bose <sbose@redhat.com>
905b4d
Date: Mon, 20 Oct 2014 17:09:34 +0200
905b4d
Subject: [PATCH 12/22] ipa: improve error reporting for extdom LDAP exop
905b4d
905b4d
This patch fixes a typo when calling ldap_parse_result() which prevented
905b4d
the server-side error message to be used and adds a hint that more
905b4d
information might be available on the server side.
905b4d
905b4d
Fixes: https://fedorahosted.org/sssd/ticket/2456
905b4d
905b4d
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
905b4d
---
905b4d
 src/providers/ipa/ipa_s2n_exop.c | 9 ++++++---
905b4d
 1 file changed, 6 insertions(+), 3 deletions(-)
905b4d
905b4d
diff --git a/src/providers/ipa/ipa_s2n_exop.c b/src/providers/ipa/ipa_s2n_exop.c
905b4d
index 96528816a520b633f1f1caa975dee9b9515621c3..bd5c00b6a48018f8f904aaa03e8162425651b37a 100644
905b4d
--- a/src/providers/ipa/ipa_s2n_exop.c
905b4d
+++ b/src/providers/ipa/ipa_s2n_exop.c
905b4d
@@ -133,7 +133,7 @@ static void ipa_s2n_exop_done(struct sdap_op *op,
905b4d
     }
905b4d
 
905b4d
     ret = ldap_parse_result(state->sh->ldap, reply->msg,
905b4d
-                            &result, &errmsg, NULL, NULL,
905b4d
+                            &result, NULL, &errmsg, NULL,
905b4d
                             NULL, 0);
905b4d
     if (ret != LDAP_SUCCESS) {
905b4d
         DEBUG(SSSDBG_OP_FAILURE, "ldap_parse_result failed (%d)\n",
905b4d
@@ -142,10 +142,13 @@ static void ipa_s2n_exop_done(struct sdap_op *op,
905b4d
         goto done;
905b4d
     }
905b4d
 
905b4d
-    DEBUG(SSSDBG_TRACE_FUNC, "ldap_extended_operation result: %s(%d), %s\n",
905b4d
-            sss_ldap_err2string(result), result, errmsg);
905b4d
+    DEBUG(result == LDAP_SUCCESS ? SSSDBG_TRACE_FUNC : SSSDBG_OP_FAILURE,
905b4d
+          "ldap_extended_operation result: %s(%d), %s.\n",
905b4d
+          sss_ldap_err2string(result), result, errmsg);
905b4d
 
905b4d
     if (result != LDAP_SUCCESS) {
905b4d
+        DEBUG(SSSDBG_OP_FAILURE, "ldap_extended_operation failed, " \
905b4d
+                                 "server logs might contain more details.\n");
905b4d
         ret = ERR_NETWORK_IO;
905b4d
         goto done;
905b4d
     }
905b4d
-- 
905b4d
1.9.3
905b4d