]> git.sur5r.net Git - openldap/commitdiff
Send common request controls with extended request.
authorKurt Zeilenga <kurt@openldap.org>
Thu, 21 Jun 2007 22:01:36 +0000 (22:01 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 21 Jun 2007 22:01:36 +0000 (22:01 +0000)
Only bitch about missing genPassword in success response.

clients/tools/ldappasswd.c

index 36b148de5b038ed6c86e9536b9aa062f111773fe..5d676e399ed6dc703f963825069f5223c21535b6 100644 (file)
@@ -311,6 +311,8 @@ main( int argc, char *argv[] )
                goto done;
        }
 
+       tool_server_controls( ld, NULL, 0);
+
        rc = ldap_extended_operation( ld,
                LDAP_EXOP_MODIFY_PASSWD, bv.bv_val ? &bv : NULL, 
                NULL, NULL, &id );
@@ -382,7 +384,7 @@ main( int argc, char *argv[] )
 
                ber_free( ber, 1 );
 
-       } else if ( newpw.bv_val == NULL ) {
+       } else if ( code == LDAP_SUCCESS && newpw.bv_val == NULL ) {
                tool_perror( "ldap_parse_extended_result", LDAP_DECODING_ERROR,
                        " new password expected", NULL, NULL, NULL );
        }