Cleanup previous commit

This commit is contained in:
Kurt Zeilenga 2000-07-15 23:34:27 +00:00
parent d2b05a3858
commit 4d45c61600
5 changed files with 21 additions and 13 deletions

View File

@ -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" );

View File

@ -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" );

View File

@ -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" );

View File

@ -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" );

View File

@ -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" );