]> git.sur5r.net Git - openldap/commitdiff
check security-related incompatible args (ITS#6849)
authorPierangelo Masarati <ando@openldap.org>
Wed, 2 Mar 2011 14:14:39 +0000 (14:14 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 2 Mar 2011 14:14:39 +0000 (14:14 +0000)
clients/tools/common.c

index da14c60e85ae7d7fdebd735bd6efbc4524b67cd9..262631e4cad1ca904c684786ff9fc4d33cdadbe9 100644 (file)
@@ -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 );
+       }
 }