From: Frédéric Marchal Date: Mon, 7 Feb 2011 18:32:46 +0000 (+0000) Subject: Disable LDAP referrals X-Git-Tag: v2.3.2~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52fe76a6b7ff1c622d74c5bd200fd5a463306136;p=thirdparty%2Fsarg.git Disable LDAP referrals LDAP referrals are disabled in ldapsearch. Let's see if that avoid the Operations Error message produced when querying a MS AD server. --- diff --git a/usertab.c b/usertab.c index 4bbd9cc..f338e7c 100644 --- a/usertab.c +++ b/usertab.c @@ -158,6 +158,10 @@ static void init_ldap_usertab(void) { } ldap_memfree(ldapuri); + if (ldap_set_option(ldap_handle, LDAP_OPT_REFERRALS, LDAP_OPT_OFF) != LDAP_OPT_SUCCESS) { + debuga(_("Could not disable LDAP_OPT_REFERRALS\n")); + exit(EXIT_FAILURE); + } int ldap_protocol_version = LDAPProtocolVersion; if (ldap_set_option(ldap_handle, LDAP_OPT_PROTOCOL_VERSION, &ldap_protocol_version) != LDAP_SUCCESS) { debuga(_("Could not set LDAP protocol version %d\n"), ldap_protocol_version);