* These functions implement the portions of AUTHMODE_LDAP and AUTHMODE_LDAP_AD which
* actually speak to the LDAP server.
*
- * Copyright (c) 2010 by Art Cancro and the citadel.org development team.
+ * Copyright (c) 2011 by Art Cancro and the citadel.org development team.
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
+ * This program is open source software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
int ctdl_require_ldap_version = 3;
}
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);
}
syslog(LOG_DEBUG, "LDAP search: %s\n", searchstring);
- i = ldap_search_ext_s(ldserver, /* ld */
+ (void) ldap_search_ext_s(
+ ldserver, /* ld */
config.c_ldap_base_dn, /* base */
LDAP_SCOPE_SUBTREE, /* scope */
searchstring, /* filter */
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);
}