From 52fe76a6b7ff1c622d74c5bd200fd5a463306136 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Marchal?= Date: Mon, 7 Feb 2011 18:32:46 +0000 Subject: [PATCH] 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. --- usertab.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.47.2