#include <ac/string.h>
#include <ac/unistd.h>
-#include <lber.h>
#include <ldap.h>
static char *binddn = NULL;
" -W\t\tprompt for bind passwd\n"
" -X id\t\tSASL authorization identity (\"dn:<dn>\" or \"u:<user>\")\n"
" -Y mech\t\tSASL mechanism\n"
-" -Z\t\trequest the use of TLS (-ZZ to make it critical)\n"
+" -Z\t\tissue Start TLS request (-ZZ to require successful response)\n"
, s );
exit( EXIT_FAILURE );
}
}
- if (want_bindpw)
+ if (want_bindpw) {
passwd.bv_val = getpassphrase("Enter LDAP Password: ");
- passwd.bv_len = strlen( passwd.bv_val );
+ passwd.bv_len = passwd.bv_val ? strlen( passwd.bv_val ) : 0;
+ }
if ( authmethod == LDAP_AUTH_SASL ) {
#ifdef HAVE_CYRUS_SASL