summaryrefslogtreecommitdiffstats
path: root/src/home
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-04-14 19:26:48 +0200
committerLennart Poettering <lennart@poettering.net>2020-07-01 11:17:28 +0200
commit85b1294488d2de3a17dbd0f82771f03fd121e036 (patch)
tree9d1071e4ba011199732c4572a000bf2262c14a97 /src/home
parenthomed: add support for authenticating with fido2 hmac-secret tokens (diff)
downloadsystemd-85b1294488d2de3a17dbd0f82771f03fd121e036.tar.xz
systemd-85b1294488d2de3a17dbd0f82771f03fd121e036.zip
pam-systemd-home: print helpful message when token's PIN is locked
Diffstat (limited to 'src/home')
-rw-r--r--src/home/pam_systemd_home.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/home/pam_systemd_home.c b/src/home/pam_systemd_home.c
index 87bf1620d5..2d2732a440 100644
--- a/src/home/pam_systemd_home.c
+++ b/src/home/pam_systemd_home.c
@@ -385,6 +385,11 @@ static int handle_generic_user_record_error(
return PAM_SERVICE_ERR;
}
+ } else if (sd_bus_error_has_name(error, BUS_ERROR_TOKEN_PIN_LOCKED)) {
+
+ (void) pam_prompt(handle, PAM_ERROR_MSG, NULL, "Security token PIN is locked, please unlock it first. (Hint: Removal and re-insertion might suffice.)");
+ return PAM_SERVICE_ERR;
+
} else if (sd_bus_error_has_name(error, BUS_ERROR_TOKEN_BAD_PIN)) {
_cleanup_(erase_and_freep) char *newp = NULL;