mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-27 01:02:53 -05:00
Add -x (simple authentication)
This commit is contained in:
parent
1e562b0d1f
commit
2c323d2b2a
1 changed files with 9 additions and 0 deletions
|
|
@ -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 );
|
||||
|
|
|
|||
Loading…
Reference in a new issue