]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Disable LDAP referrals
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Mon, 7 Feb 2011 18:32:46 +0000 (18:32 +0000)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Mon, 7 Feb 2011 18:32:46 +0000 (18:32 +0000)
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

index 4bbd9ccab7f8652cdc835e0af8130137e15ae58c..f338e7cd7c5f049e244de75788465c7d52521842 100644 (file)
--- 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);