No description
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> |
||
|---|---|---|
| .github | ||
| .zed | ||
| cosmic-greeter-config | ||
| daemon | ||
| dbus | ||
| debian | ||
| examples | ||
| i18n | ||
| res | ||
| src | ||
| .gitattributes | ||
| .gitignore | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| cosmic-greeter-start.sh | ||
| cosmic-greeter.toml | ||
| i18n.toml | ||
| justfile | ||
| LICENSE | ||
| README.md | ||
| rust-toolchain.toml | ||
| rustfmt.toml | ||
cosmic-greeter
libcosmic greeter for greetd, which can be run inside cosmic-comp
Development
This project uses just as a command runner.
Available Commands
Building
just build-debug- Compile with debug profilejust build-release- Compile with release profile (default)just build-vendored- Compile release profile with vendored dependencies- Requires vendoring first, which can be done with
just vendor
- Requires vendoring first, which can be done with
Testing & Development
just mock- Run greeter in a windowed compositor for quick testing (builds and runs the mock server example)just run- Run with debug logs (RUST_LOG=debugandRUST_BACKTRACE=full)
Code Quality
just check- Run clippy linter with pedantic warningsjust check-json- Run clippy with JSON output format
Installation
just install- Install all files (binary, daemon, D-Bus config, systemd files)just install-debian- Install only Debian package required filesjust uninstall- Remove all installed files
Cleanup
just clean- Runcargo cleanjust clean-dist- Runcargo cleanand remove vendored dependencies
Vendoring
just vendor- Vendor dependencies locally and create vendor.tarjust vendor-extract- Extract vendored dependencies from vendor.tar