]> code.citadel.org Git - citadel.git/blobdiff - citadel/ldap.c
SMTP-Client: add per facility debug logging 'smtpeventclient'
[citadel.git] / citadel / ldap.c
index 8efc6e59075bc7d6f8ab9b7e167e11c05b4ad434..cc88a7b4e202fdbfdfd5412ab1efc39ac1853e5f 100644 (file)
@@ -2,9 +2,9 @@
  * 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
+ * This program is open source 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.
@@ -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);
        }