]> git.sur5r.net Git - openldap/blobdiff - clients/tools/ldapdelete.c
move getpassphrase inside tool_bind; make sure password is always malloc'd and freed
[openldap] / clients / tools / ldapdelete.c
index 359a5c541d4571889a914152ccb338e72b504e6a..1332f9ee995130b95c284ca0a146be2cfe6bd639 100644 (file)
@@ -184,24 +184,10 @@ main( int argc, char **argv )
                if ( optind >= argc ) {
                        fp = stdin;
                }
-    }
+       }
 
        ld = tool_conn_setup( 0, &private_conn_setup );
 
-       if ( pw_file || want_bindpw ) {
-               if ( pw_file ) {
-                       rc = lutil_get_filed_password( pw_file, &passwd );
-                       if( rc ) {
-                               if ( fp && fp != stdin )
-                                       fclose( fp );
-                               return EXIT_FAILURE;
-                       }
-               } else {
-                       passwd.bv_val = getpassphrase( _("Enter LDAP Password: ") );
-                       passwd.bv_len = passwd.bv_val ? strlen( passwd.bv_val ) : 0;
-               }
-       }
-
        tool_bind( ld );
 
        tool_server_controls( ld, NULL, 0 );