default:
- fprintf( stderr, "%s: unrecongized option -%c\n",
+ fprintf( stderr, "%s: unrecognized option -%c\n",
prog, optopt );
usage (argv[0]);
}
if (want_bindpw && passwd.bv_val == NULL ) {
/* handle bind password */
- fprintf( stderr, "Bind DN: %s\n", binddn );
+ if( binddn != NULL ) {
+ fprintf( stderr, "Bind DN: %s\n", binddn );
+ }
passwd.bv_val = strdup( getpassphrase("Enter bind password: "));
passwd.bv_len = passwd.bv_val ? strlen( passwd.bv_val ) : 0;
}