]> git.sur5r.net Git - openldap/commitdiff
ITS#7695 Fix ldapsearch regression with CLDAP
authorStef Walter <stefw@redhat.com>
Thu, 12 Sep 2013 20:59:14 +0000 (22:59 +0200)
committerHoward Chu <hyc@openldap.org>
Thu, 10 Oct 2013 17:53:27 +0000 (10:53 -0700)
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 7d1f15ea0b16fde0d0c78a9304a4cd3054a8bca9..9ae6f28db015e4a3269d9fae232c7db66330cafe 100644 (file)
@@ -1620,11 +1620,13 @@ tool_bind( LDAP *ld )
                }
        }
 
-       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