From: Pierangelo Masarati Date: Sun, 19 Oct 2008 21:15:24 +0000 (+0000) Subject: default to simple bind when -D is specified and no SASL-related options are used... X-Git-Tag: ACLCHECK_0~1219 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=eba56f0ec943ae1ebd14469b14359630d33202d9;p=openldap default to simple bind when -D is specified and no SASL-related options are used (ITS#5753) --- diff --git a/clients/tools/common.c b/clients/tools/common.c index d468dd9969..5222d6321d 100644 --- a/clients/tools/common.c +++ b/clients/tools/common.c @@ -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