summaryrefslogtreecommitdiffstats
path: root/src/sss_client
diff options
context:
space:
mode:
Diffstat (limited to 'src/sss_client')
-rw-r--r--src/sss_client/pam_sss.c19
-rw-r--r--src/sss_client/sss_cli.h3
2 files changed, 22 insertions, 0 deletions
diff --git a/src/sss_client/pam_sss.c b/src/sss_client/pam_sss.c
index 4ff38f299..e629fc19b 100644
--- a/src/sss_client/pam_sss.c
+++ b/src/sss_client/pam_sss.c
@@ -771,6 +771,22 @@ static int user_info_offline_chpass(pam_handle_t *pamh)
return PAM_SUCCESS;
}
+static int user_info_otp_chpass(pam_handle_t *pamh)
+{
+ int ret;
+
+ ret = do_pam_conversation(pamh, PAM_TEXT_INFO,
+ _("After changing the OTP password, you need to "
+ "log out and back in order to acquire a ticket"),
+ NULL, NULL);
+ if (ret != PAM_SUCCESS) {
+ D(("do_pam_conversation failed."));
+ return PAM_SYSTEM_ERR;
+ }
+
+ return PAM_SUCCESS;
+}
+
static int user_info_chpass_error(pam_handle_t *pamh, size_t buflen,
uint8_t *buf)
{
@@ -856,6 +872,9 @@ static int eval_user_info_response(pam_handle_t *pamh, size_t buflen,
case SSS_PAM_USER_INFO_OFFLINE_CHPASS:
ret = user_info_offline_chpass(pamh);
break;
+ case SSS_PAM_USER_INFO_OTP_CHPASS:
+ ret = user_info_otp_chpass(pamh);
+ break;
case SSS_PAM_USER_INFO_CHPASS_ERROR:
ret = user_info_chpass_error(pamh, buflen, buf);
break;
diff --git a/src/sss_client/sss_cli.h b/src/sss_client/sss_cli.h
index 285a2979a..16a08e186 100644
--- a/src/sss_client/sss_cli.h
+++ b/src/sss_client/sss_cli.h
@@ -451,6 +451,9 @@ enum user_info_type {
* possible to change the password while
* the system is offline. This message
* is generated by the PAM responder. */
+ SSS_PAM_USER_INFO_OTP_CHPASS, /**< Tell the user that he needs to kinit
+ * or login and logout to get a TGT after
+ * an OTP password change */
SSS_PAM_USER_INFO_CHPASS_ERROR, /**< Tell the user that a password change
* failed and optionally give a reason.
* @param Size of the message as unsigned