Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swaylock doesn't handle faillock properly. #286

Open
notmentaloutlaw opened this issue Feb 9, 2023 · 0 comments
Open

Swaylock doesn't handle faillock properly. #286

notmentaloutlaw opened this issue Feb 9, 2023 · 0 comments

Comments

@notmentaloutlaw
Copy link

notmentaloutlaw commented Feb 9, 2023

If my pam is configured so if I mess up 3 times it locks my account for 10 mins. So If I login fail twice but then succeed the third time it resets my 'attempts'. With swaylock if you fail twice succeed the third but then lock your screen again and fail one more time it will count as you failed 3 times in a row and lock your account. This is because the entries are still seen in faillock. It does not reset entries when someone successfully logs in.

# faillock before starting swaylock
When                Type  Source                                           Valid

# faillock after failing swaylock two times and then success on third
When                Type  Source                                           Valid
2023-02-09 21:13:31 SVC   swaylock                                             V
2023-02-09 21:13:34 SVC   swaylock                                             V

# This should not look like this it should look like this
When                Type  Source                                           Valid

If you do this for system logins on tty you will see that it does this correctly and does not have this problem. For now users can just do faillock --reset after they logged in or add that to your keybind. But this shouldn't be needed if its configured properly. I am not that familiar with pam but maybe swaylock doesn't send the message to pam after its unlocked that it is a successful login attempt?

OS: Gentoo
Overlay: default/linux/amd64/17.0/musl/hardened/selinux
Swaylock version: 1.7.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant