Add comment explaining the previous fix. (and fix the previous patch :-).
authorJeremy Allison <jra@samba.org>
Wed, 22 Apr 2009 10:07:37 +0000 (03:07 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 22 Apr 2009 10:07:37 +0000 (03:07 -0700)
By-hand merge error :-).
Jeremy.

source/libads/ldap.c

index ace95f0a2741332d4a66abc442f33fb8a842d622..74798943f8468740fa9c01d6b5bba4f10f1e17eb 100644 (file)
@@ -112,7 +112,14 @@ static int ldap_search_with_timeout(LDAP *ld,
        if (gotalarm != 0)
                return LDAP_TIMELIMIT_EXCEEDED;
 
-       if (res == NULL) {
+
+       /*
+        * A bug in OpenLDAP means ldap_search_ext_s can return
+        * LDAP_SUCCESS but with a NULL res pointer. Cope with
+        * this. See bug #6279 for details. JRA.
+        */
+
+       if (*res == NULL) {
                return LDAP_TIMELIMIT_EXCEEDED;
        }