From 89f9598e19000fed30c1069eec01b094eeae0377 Mon Sep 17 00:00:00 2001 From: Petr Cech Date: Tue, 2 Aug 2016 10:11:14 +0200 Subject: [PATCH 74/74] LDAP: Fixing wrong pam error code for passwd This patch adds right pam error code for sssd offline state. Resolves: https://fedorahosted.org/sssd/ticket/3109 --- src/providers/ldap/ldap_auth.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/providers/ldap/ldap_auth.c b/src/providers/ldap/ldap_auth.c index 107f6ded1a903904e088f0b6b0320fe82a52af52..35f16b0d4a6f8e566b0cf63b65ba46f31e7c1bcd 100644 --- a/src/providers/ldap/ldap_auth.c +++ b/src/providers/ldap/ldap_auth.c @@ -1101,6 +1101,11 @@ sdap_pam_chpass_handler_send(TALLOC_CTX *mem_ctx, state->auth_ctx = auth_ctx; state->ev = params->ev; + if (be_is_offline(state->be_ctx)) { + pd->pam_status = PAM_AUTHINFO_UNAVAIL; + goto immediately; + } + if ((pd->priv == 1) && (pd->cmd == SSS_PAM_CHAUTHTOK_PRELIM) && (sss_authtok_get_type(pd->authtok) != SSS_AUTHTOK_TYPE_PASSWORD)) { DEBUG(SSSDBG_CONF_SETTINGS, -- 2.4.11