- not = verbose = contoper = want_bindpw = debug = manageDSAit = 0;
- fp = NULL;
- authmethod = LDAP_AUTH_SIMPLE;
- version = -1;
-
- while (( i = getopt( argc, argv, "WMnvkKch:P:p:D:w:d:f:" )) != EOF ) {
- switch( i ) {
- case 'k': /* kerberos bind */
-#ifdef HAVE_KERBEROS
- authmethod = LDAP_AUTH_KRBV4;
-#else
- fprintf (stderr, "%s was not compiled with Kerberos support\n", argv[0]);
- fprintf( stderr, usage, argv[0] );
- return( EXIT_FAILURE );
-#endif
- break;
- case 'K': /* kerberos bind, part one only */
-#ifdef HAVE_KERBEROS
- authmethod = LDAP_AUTH_KRBV41;
-#else
- fprintf (stderr, "%s was not compiled with Kerberos support\n", argv[0]);
- fprintf( stderr, usage, argv[0] );
- return( EXIT_FAILURE );
-#endif
- break;
- case 'c': /* continuous operation mode */
- ++contoper;
- break;
- case 'h': /* ldap host */
- ldaphost = strdup( optarg );
- break;
- case 'D': /* bind DN */
- binddn = strdup( optarg );
- break;
- case 'w': /* password */
- passwd = strdup( optarg );
- {
- char* p;