mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-04-18 15:20:35 +08:00
Cleanup previous commit
This commit is contained in:
parent
d2b05a3858
commit
4d45c61600
@ -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" );
|
||||
|
@ -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" );
|
||||
|
@ -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" );
|
||||
|
@ -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" );
|
||||
|
@ -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" );
|
||||
|
Loading…
x
Reference in New Issue
Block a user