From 4c716b59adfc68ee36ea12f08cc41cf3be2ec542 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 22 Apr 2009 02:54:11 -0700 Subject: [PATCH] Fix bug #6279 - winbindd crash. Cope with LDAP libraries returning LDAP_SUCCESS but not returning a result. Jeremy (cherry picked from commit 9ebc15bed8c05d0729066d97d3bfaade9fcbacb7) --- source3/libads/ldap.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 841ea8caae4..d35a49936c8 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -118,6 +118,10 @@ static int ldap_search_with_timeout(LDAP *ld, if (gotalarm != 0) return LDAP_TIMELIMIT_EXCEEDED; + if (*res == NULL) { + return LDAP_TIMELIMIT_EXCEEDED; + } + return result; } -- 2.11.4.GIT