summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stapelberg <stapelberg@users.noreply.github.com>2015-03-27 08:31:58 +0100
committerMichael Stapelberg <stapelberg@users.noreply.github.com>2015-03-27 08:31:58 +0100
commitfe99346fb15c79fff43033e8295ac6c83ff6ab15 (patch)
treefd4d5322303ab99757bf5915893cfacbdf352cdc
parentde152b1f29c0a0c2214be0f6a521860be8bc6652 (diff)
parentaaad9c0e7ac5fb39e42948ce876abcd3633a7f9b (diff)
Merge pull request #9 from qfire/master
refresh pam credentials on successful authentication
-rw-r--r--i3lock.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/i3lock.c b/i3lock.c
index 69a1377..d971f0d 100644
--- a/i3lock.c
+++ b/i3lock.c
@@ -263,6 +263,14 @@ static void input_done(void) {
/* Turn the screen on, as it may have been turned off
* on release of the 'enter' key. */
turn_monitors_on();
+
+ /* PAM credentials should be refreshed, this will for example update any kerberos tickets.
+ * Related to credentials pam_end() needs to be called to cleanup any temporary
+ * credentials like kerberos /tmp/krb5cc_pam_* files which may of been left behind if the
+ * refresh of the credentials failed. */
+ pam_setcred(pam_handle, PAM_REFRESH_CRED);
+ pam_end(pam_handle, PAM_SUCCESS);
+
exit(0);
}