From c46a5197a24c7597404199165763239eb60fe714 Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Mon, 13 Jul 2020 03:12:20 +0300 Subject: [PATCH] refresh pam credentials after successful authentication --- pam.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pam.c b/pam.c index a603bd8..0adc9c6 100644 --- a/pam.c +++ b/pam.c @@ -112,6 +112,8 @@ void run_pw_backend_child(void) { pw_buf = NULL; } + pam_setcred(auth_handle, PAM_REFRESH_CRED); + if (pam_end(auth_handle, pam_status) != PAM_SUCCESS) { swaylock_log(LOG_ERROR, "pam_end failed"); exit(EXIT_FAILURE);