-
Notifications
You must be signed in to change notification settings - Fork 403
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
bug: i3lock accepts any password #315
Comments
This issue is not actionable at the moment. Can you please describe how you are executing i3lock, what exactly you do, what you see etc? I think either it never squires the lock (and exits when giving up), or crashes, but I doubt that it really accepts any password (we don't even manage the authentication part—pam does this). |
Currently activating it manually via the following i3 keybinding:
I found the following error in
So it seems it was caused by my PAM stack being improperly configured, as the bug went away after fixing my PAM stack. Is it still expected for i3lock to accept any password, even if PAM is misconfigured like this? |
Can you describe how exactly your pam stack was misconfigured and how you fixed it? It might be good to make i3lock resilient to this misconfiguration, if possible. |
This is a diff of the fix I made to
The configuration for pam_duo was removed at some point, so I just removed the module for now. I'd be happy to provide additional information/testing to help in fixing this. |
I cannot reproduce this problem. When I add your Can you provide all the files in your |
Here is the full contents of my |
Thanks for the full configuration. I was able to reproduce the problem, but only after installing In my syslog, I see:
In the pam_duo source code, I see: i = duo_parse_config(config, __ini_handler, &cfg);
if (i == -2) {
duo_syslog(LOG_ERR, "%s must be readable only by user 'root'",
config);
return (cfg.failmode == DUO_FAIL_SAFE ? PAM_SUCCESS : PAM_SERVICE_ERR);
} else if (i == -1) {
duo_syslog(LOG_ERR, "Couldn't open %s: %s",
config, strerror(errno));
return (cfg.failmode == DUO_FAIL_SAFE ? PAM_SUCCESS : PAM_SERVICE_ERR); failmode defaults to Now, in your pam.d config file, you configured pam_duo as:
The problem is that with This misconfiguration happens entirely within PAM, and i3lock has nothing to do with it. If you want to prevent others from running into the same issue, my recommendation is:
|
It turns out there is an option given here that allows the failmode to be switched to "secure". Though this is not configurable if the configuration is missing, so that's a bit useless. Not sure that "safe" is the best default action... Thank you for the help with this anyways, glad to hear i3lock was not the culprit! |
I'm submitting a…
Current Behavior
i3lock will accept any password.
Expected Behavior
i3lock should not accept any password, but only the correct one.
Reproduction Instructions
Not sure how to reproduce at the moment but running i3lock i3lock: version 2.11.1 on Ubuntu 20.04.
Environment
Output of
i3lock --version
:The text was updated successfully, but these errors were encountered: