diff --git a/clients/tools/common.c b/clients/tools/common.c index da14c60e85..262631e4ca 100644 --- a/clients/tools/common.c +++ b/clients/tools/common.c @@ -1197,6 +1197,12 @@ tool_args( int argc, char **argv ) } #endif } + + if ( ( pw_file || want_bindpw ) && !BER_BVISNULL( &passwd ) ) { + fprintf( stderr, "%s: -%c incompatible with -w\n", + prog, ( pw_file ? 'y' : 'W' ) ); + exit( EXIT_FAILURE ); + } }