summaryrefslogtreecommitdiff
path: root/nslcd/myldap.c
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2012-08-14 19:34:41 +0000
committerArthur de Jong <arthur@arthurdejong.org>2012-08-14 19:34:41 +0000
commit1e97d8bee0dc35a9eba92bf59804fbbf675760a2 (patch)
treefbdd874ad1889d28a981297c56457e225bfa0af2 /nslcd/myldap.c
parent8c3489da26df9750cbfe4ad195a7d925711556b5 (diff)
introduce a sasl_canonicalize option that will now, by default, disable reverse host name lookups in OpenLDAP
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1733 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd/myldap.c')
-rw-r--r--nslcd/myldap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/nslcd/myldap.c b/nslcd/myldap.c
index 3e03648..e7132b0 100644
--- a/nslcd/myldap.c
+++ b/nslcd/myldap.c
@@ -639,6 +639,10 @@ static int do_set_options(MYLDAP_SESSION *session)
LDAP_SET_OPTION(session->ld,LDAP_OPT_X_TLS,&i);
}
#endif /* LDAP_OPT_X_TLS */
+#ifdef LDAP_OPT_X_SASL_NOCANON
+ log_log(LOG_DEBUG,"ldap_set_option(LDAP_OPT_X_SASL_NOCANON,%s)",nslcd_cfg->ldc_sasl_canonicalize?"LDAP_OPT_OFF":"LDAP_OPT_ON");
+ LDAP_SET_OPTION(session->ld,LDAP_OPT_X_SASL_NOCANON,nslcd_cfg->ldc_sasl_canonicalize?LDAP_OPT_OFF:LDAP_OPT_ON);
+#endif /* LDAP_OPT_X_SASL_NOCANON */
/* if nothing above failed, everything should be fine */
return LDAP_SUCCESS;
}