From: Kurt Zeilenga Date: Fri, 12 Sep 2003 20:10:05 +0000 (+0000) Subject: -y should not require -W X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~733 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=aa8fd2f6b0dfbf2467beee96add10275eddc5378;p=openldap -y should not require -W --- diff --git a/clients/tools/ldappasswd.c b/clients/tools/ldappasswd.c index 52d2cf6f11..b7b99697d5 100644 --- a/clients/tools/ldappasswd.c +++ b/clients/tools/ldappasswd.c @@ -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 );