From aa8fd2f6b0dfbf2467beee96add10275eddc5378 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 12 Sep 2003 20:10:05 +0000 Subject: [PATCH] -y should not require -W --- clients/tools/ldappasswd.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) 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 ); -- 2.39.5