[SSSD] [PATCH] Lower debug level of unexpected LDAP result codes

Sumit Bose sbose at redhat.com
Fri Mar 19 15:18:24 UTC 2010


On Fri, Mar 19, 2010 at 11:00:04AM -0400, Stephen Gallagher wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 03/19/2010 10:48 AM, Sumit Bose wrote:
> > Hi,
> > 
> > this patch implements a request from #419 to lower the debug level for
> > some LDAP result codes.
> > 
> > bye,
> > Sumit
> > 
> > 
> 
> I'd rather have us print the standard message at level 6 and then print
> something like "Unexpected result from ldap: %s(%d)" in a separate
> message. It would print twice in the case of unexpected error, but it
> would be more maintainer-friendly, I think.
> 

New version attached.

bye,
Sumit

> - -- 
> Stephen Gallagher
> RHCE 804006346421761
> 
> Delivering value year after year.
> Red Hat ranks #1 in value among software vendors.
> http://www.redhat.com/promo/vendor/
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkujkXQACgkQeiVVYja6o6MQGgCfWg2ZBz178Y8a6La2NvkBVjtt
> zosAn3TdGyuY+Vy2R4SoTZabjSXqNsiC
> =toKR
> -----END PGP SIGNATURE-----
> _______________________________________________
> sssd-devel mailing list
> sssd-devel at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/sssd-devel
-------------- next part --------------
From ecbf956c2eaa4e8b697740508baae079c9f73363 Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose at redhat.com>
Date: Fri, 19 Mar 2010 15:44:15 +0100
Subject: [PATCH] Lower debug level of unexpected LDAP result codes

---
 src/providers/ldap/sdap_async.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/providers/ldap/sdap_async.c b/src/providers/ldap/sdap_async.c
index 959c08a..15f3048 100644
--- a/src/providers/ldap/sdap_async.c
+++ b/src/providers/ldap/sdap_async.c
@@ -971,6 +971,11 @@ static void sdap_get_generic_done(struct sdap_op *op,
         DEBUG(6, ("Search result: %s(%d), %s\n",
                   ldap_err2string(result), result, errmsg));
 
+        if (result != LDAP_SUCCESS && result != LDAP_NO_SUCH_OBJECT) {
+            DEBUG(2, ("Unexpected result from ldap: %s(%d), %s\n",
+                      ldap_err2string(result), result, errmsg));
+        }
+
         tevent_req_done(req);
         return;
 
-- 
1.6.6.1



More information about the sssd-devel mailing list