X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=clients%2Ftools%2Fldapmodrdn.c;h=40615d047c8a4e3b740b96b76e126466921ad175;hb=49f414738569096eae2c94a4f05f0f3f2636b8b7;hp=d26b741474b24f560a32f48bd4d0ff599ee06889;hpb=5417fdfea7004888c3f40840f8ed1c29fa738581;p=openldap diff --git a/clients/tools/ldapmodrdn.c b/clients/tools/ldapmodrdn.c index d26b741474..40615d047c 100644 --- a/clients/tools/ldapmodrdn.c +++ b/clients/tools/ldapmodrdn.c @@ -28,7 +28,6 @@ #include #include -#include #include static char *binddn = NULL; @@ -85,7 +84,7 @@ usage( const char *s ) " -W\t\tprompt for bind passwd\n" " -X id\t\tSASL authorization identity (\"dn:\" or \"u:\")\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 ); @@ -364,9 +363,10 @@ main(int argc, char **argv) } } - 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