]> git.sur5r.net Git - i3/i3lock/commitdiff
Ignore password validation is pam is in wrong state
authorNeodyblue <sieramsn@gmail.com>
Mon, 13 Oct 2014 10:39:13 +0000 (11:39 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 13 Oct 2014 15:53:49 +0000 (17:53 +0200)
This add a protection against wrong password spamming

i3lock.c

index 64e4600142f0f853023f9cbbb4c4fe9364b1d2c7..71b02eec842ede34fdb8f4b30c1df9564c27a6d1 100644 (file)
--- a/i3lock.c
+++ b/i3lock.c
@@ -299,6 +299,9 @@ static void handle_key_press(xcb_key_press_event_t *event) {
     case XKB_KEY_Return:
     case XKB_KEY_KP_Enter:
     case XKB_KEY_XF86ScreenSaver:
+        if (pam_state == STATE_PAM_WRONG)
+            return;
+
         if (skip_without_validation()) {
             clear_input();
             return;