]> git.sur5r.net Git - openldap/blobdiff - clients/tools/ldapmodrdn.c
Added -llber 'N' ber_printf format which inserts a NULL if
[openldap] / clients / tools / ldapmodrdn.c
index d26b741474b24f560a32f48bd4d0ff599ee06889..40615d047c8a4e3b740b96b76e126466921ad175 100644 (file)
@@ -28,7 +28,6 @@
 #include <ac/string.h>
 #include <ac/unistd.h>
 
-#include <lber.h>
 #include <ldap.h>
 
 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:<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 );
@@ -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