From eba56f0ec943ae1ebd14469b14359630d33202d9 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sun, 19 Oct 2008 21:15:24 +0000 Subject: [PATCH] default to simple bind when -D is specified and no SASL-related options are used (ITS#5753) --- clients/tools/common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.39.5