summaryrefslogtreecommitdiffstats
path: root/src/sss_client
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2010-04-23 13:37:22 +0200
committerStephen Gallagher <sgallagh@redhat.com>2010-05-07 16:38:22 -0400
commit013f551f7ebaff5ef8887cf82e9d6978b38559d3 (patch)
treecb5ed48375f8367c96c83e2ef9e8fea06541ffe4 /src/sss_client
parent753fe10308bbf9192b9ecd7b3cc52fb77bc329d9 (diff)
downloadsssd-013f551f7ebaff5ef8887cf82e9d6978b38559d3.tar.gz
sssd-013f551f7ebaff5ef8887cf82e9d6978b38559d3.tar.xz
sssd-013f551f7ebaff5ef8887cf82e9d6978b38559d3.zip
Handle Krb5 password expiration warning
Diffstat (limited to 'src/sss_client')
-rw-r--r--src/sss_client/pam_sss.c14
-rw-r--r--src/sss_client/sss_cli.h6
2 files changed, 18 insertions, 2 deletions
diff --git a/src/sss_client/pam_sss.c b/src/sss_client/pam_sss.c
index a3e3d86b1..22c05fc8c 100644
--- a/src/sss_client/pam_sss.c
+++ b/src/sss_client/pam_sss.c
@@ -888,7 +888,7 @@ static int eval_response(pam_handle_t *pamh, size_t buflen, uint8_t *buf,
switch(type) {
case SSS_PAM_SYSTEM_INFO:
if (buf[p + (len -1)] != '\0') {
- D(("user info does not end with \\0."));
+ D(("system info does not end with \\0."));
break;
}
logger(pamh, LOG_INFO, "system info: [%s]", &buf[p]);
@@ -940,6 +940,18 @@ static int eval_response(pam_handle_t *pamh, size_t buflen, uint8_t *buf,
D(("eval_user_info_response failed"));
}
break;
+ case SSS_PAM_TEXT_MSG:
+ if (buf[p + (len -1)] != '\0') {
+ D(("system info does not end with \\0."));
+ break;
+ }
+
+ ret = do_pam_conversation(pamh, PAM_TEXT_INFO, (char *) &buf[p],
+ NULL, NULL);
+ if (ret != PAM_SUCCESS) {
+ D(("do_pam_conversation failed."));
+ }
+ break;
default:
D(("Unknown response type [%d]", type));
}
diff --git a/src/sss_client/sss_cli.h b/src/sss_client/sss_cli.h
index f7e58fe93..8712a6f90 100644
--- a/src/sss_client/sss_cli.h
+++ b/src/sss_client/sss_cli.h
@@ -316,9 +316,13 @@ enum response_type {
* @param String, zero terminated, of the form
* name=value. See putenv(3) and pam_putenv(3) for
* details. */
- SSS_PAM_USER_INFO /**< A message which should be displayed to the user.
+ SSS_PAM_USER_INFO, /**< A message which should be displayed to the user.
* @param User info message, see #user_info_type
* for details. */
+ SSS_PAM_TEXT_MSG, /**< A plain text message which should be displayed to
+ * the user.This should only be used in the case where
+ * it is not possile to use SSS_PAM_USER_INFO.
+ * @param A zero terminated string. */
};
/**