Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
tl;dr
When using
pam_u2f
or any PAM module that sends a message and awaits for external input:AUTH_TIMEOUT
is respected and your screen blanks out correctly (opt-in)Long description
Adds support for an interactive screen when receiving info/msg from PAM.
This means that clock will keep ticking if you receive an error or info message from PAM. This is particularly useful for when using "ui blocking" modules such as
pam_u2f
, where you get your U2F device blinking while waiting for an input and PAM will be waiting after leaving you with the message "Please touch the device". Without this patch, that screen would seem frozen, as the clock (if displayed) would be static and your screen would never go blank even after timeout. You had two options, either finish the authentication by touching the device, or remove it so it would fail and go back to the fallback authentication mechanism (usually user/password).For that feature to work well, there's also a new env variable you should set (
XSECURELOCK_AUTHPROTO_KILL_ON_TIMEOUT
): it works by killing theauthproto
process responsible for that auth instance if timeout is reached or user actively pressesEsc
. That step must be done if the PAM auth module you're using keeps waiting indefinitely for an action from the user, which will inevitably make the screen hang forever if that condition is not met.All in all, these features will make the UI more consistent, by making sure that in any type of message received from
authproto
, we can behave using the same set of rules, like timeouts and screen updates (so the clock ticks!)