Disable ldap referrals so Craptastic Directory does not break, thanks beto for the...
authorArt Cancro <ajc@uncensored.citadel.org>
Mon, 17 Oct 2011 02:30:27 +0000 (22:30 -0400)
committerWilfried Goesgens <dothebart@citadel.org>
Tue, 18 Oct 2011 19:00:59 +0000 (21:00 +0200)
citadel/ldap.c

index 8efc6e59075bc7d6f8ab9b7e167e11c05b4ad434..baa123aebc67441233428f7a90ca1d1668bff012 100644 (file)
@@ -99,6 +99,7 @@ int CtdlTryUserLDAP(char *username,
        }
 
        ldap_set_option(ldserver, LDAP_OPT_PROTOCOL_VERSION, &ctdl_require_ldap_version);
+       ldap_set_option(ldserver, LDAP_OPT_REFERRALS, (void *)LDAP_OPT_OFF);
 
        striplt(config.c_ldap_bind_dn);
        striplt(config.c_ldap_bind_pw);
@@ -242,6 +243,7 @@ int CtdlTryPasswordLDAP(char *user_dn, const char *password)
                else {
                        syslog(LOG_DEBUG, "LDAP: Cannot bind: %s (%d)\n", ldap_err2string(i), i);
                }
+               ldap_set_option(ldserver, LDAP_OPT_REFERRALS, (void *)LDAP_OPT_OFF);
                ldap_unbind(ldserver);
        }