]> git.sur5r.net Git - openldap/blobdiff - clients/tools/ldapmodify.c
Be a bit more liberal
[openldap] / clients / tools / ldapmodify.c
index 3eb7d1f597743a412703e6ec270827696dafe8e8..f919d4e2d1d87dd8e8e87fe3fff6101dca7e82cc 100644 (file)
@@ -121,12 +121,12 @@ usage( const char *prog )
 "  -P version procotol version (default: 3)\n"
 "  -Q         use SASL Quiet mode\n"
 "  -R realm   SASL realm\n"
-"  -U user    SASL authentication identity (username)\n"
+"  -U authcid SASL authentication identity\n"
 "  -v         run in verbose mode (diagnostics to standard output)\n"
 "  -w passwd  bind passwd (for simple authentication)\n"
 "  -W         prompt for bind passwd\n"
 "  -x         Simple authentication\n"
-"  -X id      SASL authorization identity (\"dn:<dn>\" or \"u:<user>\")\n"
+"  -X authzid SASL authorization identity (\"dn:<dn>\" or \"u:<user>\")\n"
 "  -Y mech    SASL mechanism\n"
 "  -Z         Start TLS request (-ZZ to require successful response)\n"
             , prog, (strcmp( prog, "ldapadd" ) ? " is to replace" : "") );
@@ -436,7 +436,7 @@ main( int argc, char **argv )
                {
                        char* p;
 
-                       for( p = optarg; *p == '\0'; p++ ) {
+                       for( p = optarg; *p != '\0'; p++ ) {
                                *p = '\0';
                        }
                }
@@ -616,11 +616,10 @@ main( int argc, char **argv )
        }
 
        if ( use_tls && ldap_start_tls_s( ld, NULL, NULL ) != LDAP_SUCCESS ) {
+               ldap_perror( ld, "ldap_start_tls" );
                if ( use_tls > 1 ) {
-                       ldap_perror( ld, "ldap_start_tls" );
                        return( EXIT_FAILURE );
                }
-               fprintf( stderr, "WARNING: could not start TLS\n" );
        }
 
        if (want_bindpw) {