]> git.sur5r.net Git - openldap/commitdiff
Cleanup previous commit
authorKurt Zeilenga <kurt@openldap.org>
Sat, 15 Jul 2000 23:34:27 +0000 (23:34 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 15 Jul 2000 23:34:27 +0000 (23:34 +0000)
clients/tools/ldapdelete.c
clients/tools/ldapmodify.c
clients/tools/ldapmodrdn.c
clients/tools/ldappasswd.c
clients/tools/ldapsearch.c

index 1bcde372d24b5f5f1f7b0cfc0b85e4ad186b3c53..dee2fa9381c1d0a3566f9db8622785f45a91f5bf 100644 (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" );
index 8b6831d9813a2094a6ff743b3029a02eaa6fd336..274ecb13cf6c0251cdba4150fbd05cd37f266d1e 100644 (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" );
index 4a7b5cfc3482e38fd881f0a5f307bd022cb5b8a8..b0cab08e6afb600807fa71792754d3d4e536dc31 100644 (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" );
index 54b2b8290aa228e58773619559aab1509d19301d..aeeb39e69b8443f248f1110e3f45c353cedd8968 100644 (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" );
index e07b3ff83866dbb043de7020918fd7d6b44729d2..e31800f7c8581185be18564ceb8ada33220f18d0 100644 (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" );