Add -x (simple authentication)

This commit is contained in:
Kurt Zeilenga 2000-07-16 00:21:41 +00:00
parent 1e562b0d1f
commit 2c323d2b2a

View 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 );