diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2012-11-13 20:03:59 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2012-11-13 20:03:59 +0000 |
commit | e84a5156a99e8423522ef1f0b9cd0000e8e30446 (patch) | |
tree | 218eab601ab1868889ba62263816e5e18713cb2a /nslcd/myldap.c | |
parent | 702105695b26a12d47203fbacb4fc8057858a8b3 (diff) |
to only set LDAP_OPT_X_SASL_NOCANON if the sasl_canonicalize option is explicitly set in the configuration file
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1824 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd/myldap.c')
-rw-r--r-- | nslcd/myldap.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nslcd/myldap.c b/nslcd/myldap.c index 048d878..afbb5e9 100644 --- a/nslcd/myldap.c +++ b/nslcd/myldap.c @@ -668,8 +668,11 @@ static int do_set_options(MYLDAP_SESSION *session) } #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); + if (nslcd_cfg->ldc_sasl_canonicalize>=0) + { + 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; |