default to simple bind when -D is specified and no SASL-related options are used (ITS#5753)

This commit is contained in:
Pierangelo Masarati 2008-10-19 21:15:24 +00:00
parent 4cef770d2b
commit eba56f0ec9

View File

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