LDAP referrals are disabled in ldapsearch. Let's see if that avoid the
Operations Error message produced when querying a MS AD server.
}
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);