]> git.sur5r.net Git - openldap/commitdiff
-y should not require -W
authorKurt Zeilenga <kurt@openldap.org>
Fri, 12 Sep 2003 20:10:05 +0000 (20:10 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 12 Sep 2003 20:10:05 +0000 (20:10 +0000)
clients/tools/ldappasswd.c

index 52d2cf6f11a07a438d2aec1e14cdc1ecf8d12605..b7b99697d5eb9d8f633623c041e82618eb8c509a 100644 (file)
@@ -207,14 +207,13 @@ main( int argc, char *argv[] )
                newpw.bv_len = strlen( newpw.bv_val );
        }
 
-       if( want_bindpw && passwd.bv_val == NULL ) {
-               if ( pw_file ) {
-                       rc = lutil_get_filed_password( pw_file, &passwd );
-                       if( rc ) return EXIT_FAILURE;
-               } else {
-                       passwd.bv_val = getpassphrase( _("Enter LDAP Password: ") );
-                       passwd.bv_len = passwd.bv_val ? strlen( passwd.bv_val ) : 0;
-               }
+       if ( pw_file ) {
+               rc = lutil_get_filed_password( pw_file, &passwd );
+               if( rc ) return EXIT_FAILURE;
+
+       } else if ( want_bindpw ) {
+               passwd.bv_val = getpassphrase( _("Enter LDAP Password: ") );
+               passwd.bv_len = passwd.bv_val ? strlen( passwd.bv_val ) : 0;
        }
 
        ld = tool_conn_setup( 0, 0 );