]> git.sur5r.net Git - openldap/commitdiff
Add -x (simple authentication)
authorKurt Zeilenga <kurt@openldap.org>
Sun, 16 Jul 2000 00:21:41 +0000 (00:21 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sun, 16 Jul 2000 00:21:41 +0000 (00:21 +0000)
clients/tools/ldappasswd.c

index 6a995374f663ed8e34367cf0d129b27e16aad556..91dd6fb53babbfdeec7c6db47120598436209680 100644 (file)
@@ -49,6 +49,7 @@ usage(const char *s)
 "      -v\t\tverbose mode\n"
 "      -w passwd\tbind password (for simple authentication)\n"
 "      -W\t\tprompt for bind password\n"
+"      -x\t\tSimple authentication\n"
 "      -X id\t\tSASL authorization identity (\"dn:<dn>\" or \"u:<user>\")\n"
 "      -Y mech\t\tSASL mechanism\n"
 "      -Z\t\tissue Start TLS request (-ZZ to require successful response)\n"
@@ -217,6 +218,14 @@ main( int argc, char *argv[] )
                        return( EXIT_FAILURE );
 #endif
                        break;
+               case 'x':
+                       if( authmethod != -1 && authmethod != LDAP_AUTH_SIMPLE ) {
+                               fprintf( stderr, "%s: incompatible with previous "
+                                       "authentication choice\n", prog );
+                               return EXIT_FAILURE;
+                       }
+                       authmethod = LDAP_AUTH_SIMPLE;
+                       break;
                case 'X':
 #ifdef HAVE_CYRUS_SASL
                        sasl_authz_id = strdup( optarg );