From: Kurt Zeilenga Date: Sat, 15 Jul 2000 23:34:27 +0000 (+0000) Subject: Cleanup previous commit X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~2440 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4d45c6160079d391dc119868ed1305ac25140e0e;p=openldap Cleanup previous commit --- diff --git a/clients/tools/ldapdelete.c b/clients/tools/ldapdelete.c index 1bcde372d2..dee2fa9381 100644 --- a/clients/tools/ldapdelete.c +++ b/clients/tools/ldapdelete.c @@ -342,7 +342,11 @@ main( int argc, char **argv ) version = LDAP_VERSION3; } if (authmethod == -1 && version > LDAP_VERSION2) { +#ifdef HAVE_CYRUS_SASL authmethod = LDAP_AUTH_SASL; +#else + authmethod = LDAP_AUTH_SIMPLE; +#endif } if ( fp == NULL ) { @@ -407,8 +411,6 @@ main( int argc, char **argv ) if ( authmethod == LDAP_AUTH_SASL ) { #ifdef HAVE_CYRUS_SASL - ldap_set_sasl_interact_proc( ld, lutil_sasl_interact ); - if( sasl_secprops != NULL ) { rc = ldap_set_option( ld, LDAP_OPT_X_SASL_SECPROPS, (void *) sasl_secprops ); @@ -422,7 +424,7 @@ main( int argc, char **argv ) } rc = ldap_sasl_interactive_bind_s( ld, binddn, - sasl_mech, NULL, NULL ); + sasl_mech, NULL, NULL, lutil_sasl_interact ); if( rc != LDAP_SUCCESS ) { ldap_perror( ld, "ldap_sasl_interactive_bind_s" ); diff --git a/clients/tools/ldapmodify.c b/clients/tools/ldapmodify.c index 8b6831d981..274ecb13cf 100644 --- a/clients/tools/ldapmodify.c +++ b/clients/tools/ldapmodify.c @@ -399,7 +399,11 @@ main( int argc, char **argv ) version = LDAP_VERSION3; } if (authmethod == -1 && version > LDAP_VERSION2) { +#ifdef HAVE_CYRUS_SASL authmethod = LDAP_AUTH_SASL; +#else + authmethod = LDAP_AUTH_SIMPLE; +#endif } if ( argc != optind ) @@ -471,8 +475,6 @@ main( int argc, char **argv ) if ( authmethod == LDAP_AUTH_SASL ) { #ifdef HAVE_CYRUS_SASL - ldap_set_sasl_interact_proc( ld, lutil_sasl_interact ); - if( sasl_secprops != NULL ) { rc = ldap_set_option( ld, LDAP_OPT_X_SASL_SECPROPS, (void *) sasl_secprops ); @@ -486,7 +488,7 @@ main( int argc, char **argv ) } rc = ldap_sasl_interactive_bind_s( ld, binddn, - sasl_mech, NULL, NULL ); + sasl_mech, NULL, NULL, lutil_sasl_interact ); if( rc != LDAP_SUCCESS ) { ldap_perror( ld, "ldap_sasl_interactive_bind_s" ); diff --git a/clients/tools/ldapmodrdn.c b/clients/tools/ldapmodrdn.c index 4a7b5cfc34..b0cab08e6a 100644 --- a/clients/tools/ldapmodrdn.c +++ b/clients/tools/ldapmodrdn.c @@ -355,7 +355,11 @@ main(int argc, char **argv) version = LDAP_VERSION3; } if (authmethod == -1 && version > LDAP_VERSION2) { +#ifdef HAVE_CYRUS_SASL authmethod = LDAP_AUTH_SASL; +#else + authmethod = LDAP_AUTH_SIMPLE; +#endif } havedn = 0; @@ -434,8 +438,6 @@ main(int argc, char **argv) if ( authmethod == LDAP_AUTH_SASL ) { #ifdef HAVE_CYRUS_SASL - ldap_set_sasl_interact_proc( ld, lutil_sasl_interact ); - if( sasl_secprops != NULL ) { rc = ldap_set_option( ld, LDAP_OPT_X_SASL_SECPROPS, (void *) sasl_secprops ); @@ -449,7 +451,7 @@ main(int argc, char **argv) } rc = ldap_sasl_interactive_bind_s( ld, binddn, - sasl_mech, NULL, NULL ); + sasl_mech, NULL, NULL, lutil_sasl_interact ); if( rc != LDAP_SUCCESS ) { ldap_perror( ld, "ldap_sasl_interactive_bind_s" ); diff --git a/clients/tools/ldappasswd.c b/clients/tools/ldappasswd.c index 54b2b8290a..aeeb39e69b 100644 --- a/clients/tools/ldappasswd.c +++ b/clients/tools/ldappasswd.c @@ -337,8 +337,6 @@ main( int argc, char *argv[] ) if ( authmethod == LDAP_AUTH_SASL ) { #ifdef HAVE_CYRUS_SASL - ldap_set_sasl_interact_proc( ld, lutil_sasl_interact ); - if( sasl_secprops != NULL ) { rc = ldap_set_option( ld, LDAP_OPT_X_SASL_SECPROPS, (void *) sasl_secprops ); @@ -352,7 +350,7 @@ main( int argc, char *argv[] ) } rc = ldap_sasl_interactive_bind_s( ld, binddn, - sasl_mech, NULL, NULL ); + sasl_mech, NULL, NULL, lutil_sasl_interact ); if( rc != LDAP_SUCCESS ) { ldap_perror( ld, "ldap_sasl_interactive_bind_s" ); diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index e07b3ff838..e31800f7c8 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -464,7 +464,11 @@ main( int argc, char **argv ) version = LDAP_VERSION3; } if (authmethod == -1 && version > LDAP_VERSION2) { +#ifdef HAVE_CYRUS_SASL authmethod = LDAP_AUTH_SASL; +#else + authmethod = LDAP_AUTH_SIMPLE; +#endif } if (( argc - optind < 1 ) || @@ -606,7 +610,7 @@ main( int argc, char **argv ) } rc = ldap_sasl_interactive_bind_s( ld, binddn, - sasl_mech, NULL, NULL, lutil_sasl_interact ); + sasl_mech, NULL, NULL, lutil_sasl_interact ); if( rc != LDAP_SUCCESS ) { ldap_perror( ld, "ldap_sasl_interactive_bind_s" );