aboutsummaryrefslogtreecommitdiff
path: root/pam_ldaphome/pam_ldaphome.c
diff options
context:
space:
mode:
Diffstat (limited to 'pam_ldaphome/pam_ldaphome.c')
-rw-r--r--pam_ldaphome/pam_ldaphome.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/pam_ldaphome/pam_ldaphome.c b/pam_ldaphome/pam_ldaphome.c
index 83b9cf7..ba6494f 100644
--- a/pam_ldaphome/pam_ldaphome.c
+++ b/pam_ldaphome/pam_ldaphome.c
@@ -406,6 +406,21 @@ ldap_connect(struct gray_env *env)
}
/* try to continue anyway */
}
+
+ val = gray_env_get(env, "tls-cacert");
+ if (val) {
+ rc = ldap_set_option(ld,
+ LDAP_OPT_X_TLS_CACERTFILE,
+ val);
+ if (rc != LDAP_SUCCESS) {
+ _pam_log(LOG_ERR,
+ "setting of LDAP_OPT_X_TLS_CACERTFILE failed");
+ if (tls == tls_only) {
+ ldap_unbind(ld);
+ return NULL;
+ }
+ }
+ }
}
}

Return to:

Send suggestions and report system problems to the System administrator.