]> git.sur5r.net Git - openldap/commitdiff
From: Stef Walter <stefw@redhat.com>
authorQuanah Gibson-Mount <quanah@openldap.org>
Thu, 10 Oct 2013 18:07:57 +0000 (11:07 -0700)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 10 Oct 2013 18:07:57 +0000 (11:07 -0700)
ITS#7695 Fix ldapsearch regression with CLDAP

Don't try to parse the result of a CLDAP bind request. Since these are
faked, no message is actually returned.

clients/tools/common.c

index 9b17ad6a710a5bb1c366cb95ee9e8731ad5eb315..9bd97730d947ebe307964468de971f7e2d12a6aa 100644 (file)
@@ -1521,11 +1521,13 @@ tool_bind( LDAP *ld )
                        tool_exit( ld, LDAP_LOCAL_ERROR );
                }
 
-               rc = ldap_parse_result( ld, result, &err, &matched, &info, &refs,
-                       &ctrls, 1 );
-               if ( rc != LDAP_SUCCESS ) {
-                       tool_perror( "ldap_bind parse result", rc, NULL, matched, info, refs );
-                       tool_exit( ld, LDAP_LOCAL_ERROR );
+               if ( result ) {
+                       rc = ldap_parse_result( ld, result, &err, &matched, &info, &refs,
+                                               &ctrls, 1 );
+                       if ( rc != LDAP_SUCCESS ) {
+                               tool_perror( "ldap_bind parse result", rc, NULL, matched, info, refs );
+                               tool_exit( ld, LDAP_LOCAL_ERROR );
+                       }
                }
 
 #ifdef LDAP_CONTROL_PASSWORDPOLICYREQUEST