[SSSD] [PATCH] LDAP provider: Error while setting the nocanon option should not be fatal

Jakub Hrozek jhrozek at redhat.com
Wed Dec 7 17:44:23 UTC 2011


https://fedorahosted.org/sssd/ticket/1100
-------------- next part --------------
From 3f7bfad7971cc6f4e3090321a358517ba2002ea9 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Mon, 5 Dec 2011 22:33:50 +0100
Subject: [PATCH] LDAP provider: Error while setting the nocanon option should
 not be fatal

https://fedorahosted.org/sssd/ticket/1100
---
 src/providers/ldap/sdap_async_connection.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/providers/ldap/sdap_async_connection.c b/src/providers/ldap/sdap_async_connection.c
index 1f829f176de864c2002641967188d8d12e696ccb..6425569e5d45fba2b64f205aaaf869445b4b266c 100644
--- a/src/providers/ldap/sdap_async_connection.c
+++ b/src/providers/ldap/sdap_async_connection.c
@@ -264,9 +264,15 @@ static void sdap_sys_connect_done(struct tevent_req *subreq)
     lret = ldap_set_option(state->sh->ldap, LDAP_OPT_X_SASL_NOCANON,
                            sasl_nocanon ? LDAP_OPT_ON : LDAP_OPT_OFF);
     if (lret != LDAP_OPT_SUCCESS) {
-        DEBUG(1, ("Failed to set LDAP SASL nocanon option to %s\n",
-                   sasl_nocanon ? "true" : "false"));
-        goto fail;
+        /* Do not fail, just warn into both debug logs and syslog */
+        DEBUG(SSSDBG_MINOR_FAILURE,
+              ("Failed to set LDAP SASL nocanon option to %s. If your system "
+               "is configured to use SASL, LDAP operations might fail.\n",
+              sasl_nocanon ? "true" : "false"));
+        sss_log(SSS_LOG_INFO,
+                "Failed to set LDAP SASL nocanon option to %s. If your system "
+                "is configured to use SASL, LDAP operations might fail.\n",
+                sasl_nocanon ? "true" : "false");
     }
 
     /* if we do not use start_tls the connection is not really connected yet
-- 
1.7.7.3



More information about the sssd-devel mailing list