diff options
Diffstat (limited to 'source3/libads/ldap.c')
-rw-r--r-- | source3/libads/ldap.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 9ffbd57e4a..cc72d81b86 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -118,6 +118,16 @@ static int ldap_search_with_timeout(LDAP *ld, if (gotalarm != 0) return LDAP_TIMELIMIT_EXCEEDED; + /* + * 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; + } + return result; } |