greetd delivers PAM_ERROR_MSG as an auth message of type Error, and ipc.rs
turned that into Message::Error, which cancels the greetd session. But such a
message describes the current attempt, not the end of the conversation:
pam_fprintd reports "Failed to match fingerprint" this way and then retries
until max-tries is reached.
The consequence at the login screen is that a single failed fingerprint press
ends the conversation. The greeter reconnects and immediately creates a new
session, whose PAM worker calls fprintd's Claim 14 ms later while the previous
worker still holds it, so the claim is denied and no fingerprint prompt ever
appears again. The previous worker only exits when it next tries to talk to the
greeter, which can be arbitrarily far in the future, so delaying the new session
does not help either.
Per the greetd protocol every auth message has to be acknowledged with
PostAuthMessageResponse, and for a non-interactive one the response is None,
which is what the Info arm already does. Route the Error message to its own
Message::AuthError that shows the text and acknowledges it. Message::Error and
the Response::Error path stay as they are, so a failed authentication still
cancels the session.
Drafted with AI assistance (Claude Code); the change and the measurements behind
it were reviewed and tested by me on real hardware.
Signed-off-by: chris-010 <10660568+chris-010@users.noreply.github.com>
Message::Auth is constructed in exactly one place, the .on_submit of the
password input, and it forwards whatever the field holds to greetd. An
empty field therefore sends PostAuthMessageResponse with response
Some(""), PAM rejects it, and greetd tears the session down; the greeter
then reconnects with a fresh CreateSession. Every stray Enter costs that
round trip, and while it runs the user is looking at the authenticating
spinner.
Non-interactive auth messages (AuthMessageType::Info) are acknowledged
separately with response None and never reach Message::Auth, so an empty
Some can only come from the user submitting an empty field.
This is the login-screen counterpart of the lock-screen fix in #509. The
two do not overlap; that one guards Message::Submit in locker.rs.
Drafted with AI assistance (Claude Code); the change was reviewed, built
and tested by me as described.
Signed-off-by: chris-010 <10660568+chris-010@users.noreply.github.com>
Downstream distributions have optional logind, but the logind feature
must be defined at compile time. If cosmic-greeter is compiled with
logind support it fails to run on a host that's not running logind.
Detect whether logind is present at runtime, enabling the use of the
same binaries regardless of whether logind is installed or not.
- Switch gid and supplementary groups to user's when reading user's
config
- Only show users between UID_MIN and UID_MAX in /etc/login.defs
- Open accountsservice icons with O_NOFOLLOW to explicitly disallow
symlinks
- handle greetd ipc auth_message error types as errors
- handle locker pam error_msg as errors
- fixes an issue where greeter would get stuck in 'Authenticating...'
state due to error messages being treated as normal messages
This prevents the other column items from jumping around depending on if Caps Lock is toggled or if an error is shown. Now only the error text moves depending on if Caps Lock is toggled.