From 869b56a24a1408ea798682b45f9c297341f88ad5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 22 Apr 2009 03:07:37 -0700 Subject: [PATCH] Add comment explaining the previous fix. (and fix the previous patch :-). By-hand merge error :-). Jeremy. --- source/libads/ldap.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/libads/ldap.c b/source/libads/ldap.c index ace95f0a274..74798943f84 100644 --- a/source/libads/ldap.c +++ b/source/libads/ldap.c @@ -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; } -- 2.34.1