]> git.sur5r.net Git - openldap/commitdiff
default to simple bind when -D is specified and no SASL-related options are used...
authorPierangelo Masarati <ando@openldap.org>
Sun, 19 Oct 2008 21:15:24 +0000 (21:15 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sun, 19 Oct 2008 21:15:24 +0000 (21:15 +0000)
clients/tools/common.c

index d468dd9969f743c66d392ec5ccdd0d9eed4bef97..5222d6321dc20af868509fa2e96ca1e78166231f 100644 (file)
@@ -981,7 +981,11 @@ tool_args( int argc, char **argv )
 
        if (authmethod == -1 && protocol > LDAP_VERSION2) {
 #ifdef HAVE_CYRUS_SASL
-               authmethod = LDAP_AUTH_SASL;
+               if ( binddn != NULL ) {
+                       authmethod = LDAP_AUTH_SIMPLE;
+               } else {
+                       authmethod = LDAP_AUTH_SASL;
+               }
 #else
                authmethod = LDAP_AUTH_SIMPLE;
 #endif