Skip to content

Strip password keyring auth from sddm-autologin too - #10396

Open
calledtoconstruct wants to merge 2 commits into
omacom:quattrofrom
calledtoconstruct:fix/sddm-autologin-keyring
Open

calledtoconstruct wants to merge 2 commits into
omacom:quattrofrom
calledtoconstruct:fix/sddm-autologin-keyring

Conversation

@calledtoconstruct

Copy link
Copy Markdown

install/login/sddm.sh stripped gnome-keyring auth/password from /etc/pam.d/sddm. Autologin uses /etc/pam.d/sddm-autologin, so passwordless machines still created an encrypted login keyring.

Strip the same -auth/-password modules from the autologin stack, leave -session auto_start, and migrate existing installs.

Fixes #10243

@calledtoconstruct
calledtoconstruct force-pushed the fix/sddm-autologin-keyring branch from f4bb103 to 85aa288 Compare September 30, 2026 13:37
@greptile-apps

greptile-apps Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Critical risk] Modifies system authentication configuration files.

The PR appears safe to merge; no outstanding findings remain.

Summary

The PR removes gnome-keyring auth and password modules from the SDDM autologin PAM stack on fresh installs and migrates existing installs, while retaining session auto-start. The updated tests cover both migration privilege paths and the fresh-install commands.

Reviews (2) · Last reviewed commit: "Cover root and fresh-install paths in th..."

Comment thread test/shell.d/sddm-keyring-test.sh Resolved
Comment thread test/shell.d/sddm-keyring-test.sh Resolved
@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks, @calledtoconstruct. I reviewed this at aa06e70 and tested it on a stock Omarchy VM that uses SDDM autologin. It removes one journal warning, but I couldn't reproduce the bug it describes, and the change doesn't touch the symptom from #10243.

What ran, on a worker built from the Omarchy ISO (gnome-keyring 1:50.0-1, sddm 0.21.0-7):

  • Base (quattro at 8b4eae66): /etc/pam.d/sddm-autologin still has -auth optional pam_gnome_keyring.so. Each boot logs gkr-pam: no password is available for user and then gkr-pam: couldn't unlock the login keyring., as the issue says. But ~/.local/share/keyrings contains only the passwordless Default_keyring.keyring, and no login.keyring is ever created. A secret stored with secret-tool was still readable after a reboot, with no prompt.
  • This PR: I applied migrations/1788600002.sh (it removed the -auth line and left -session ... auto_start) and rebooted. The no password is available line is gone. couldn't unlock the login keyring. is still logged, the keyring directory is unchanged, and the same secret still reads back.

Why: in pam_gnome_keyring, the auth stage returns as soon as it finds no PAM_AUTHTOK, before it would start the daemon, unlock anything or stash a password. That is what happens under autologin, so this line can't create or encrypt a keyring there. The couldn't unlock message comes from the session stage: auto_start calls unlock with no password, and this PR deliberately keeps that line. The -password line only runs on a password change, and autologin never does one. The comment in migrations/1788600002.sh:3-6 says these modules "create an encrypted login keyring", which isn't accurate.

Tests: test/shell.d/sddm-keyring-test.sh passes on the worker (4 of 4). ./test/cli has one failure (vscode generated theme references current theme file), and base fails it the same way, so it isn't caused by this PR. The tests check that lines are removed from the PAM files. They don't exercise PAM or a keyring.

Second opinion: Codex Medium reviewed this separately and reached the same conclusion from gnome-keyring's source (pam/gkr-pam-module.c). It doesn't have access to the worker results above, but it can read this session's notes, so its independence isn't guaranteed. It found no defects in the migration's idempotence or its sudo/root branch, and it confirmed the patterns leave the stock pam_kwallet5 and -session ... auto_start lines alone.

Overlapping pull requests: #13625 removes every pam_gnome_keyring.so line from sddm-autologin, including auto_start, to fix the 30-second autologin stall in #13414. #12246 removes auth, password and auto_start from both stacks. Both cover what this one removes, and this test's check that auto_start stays would conflict with them.

If WhatsApp and Chromium sessions are being lost after reboot, that more likely matches a corrupted or replaced default keyring (#12563, #5105, and #11697 proposes a repair) than this PAM line.

Next: this is waiting on the maintainer. The choice is between merging it as a cleanup that only silences that log line, closing it, or folding it into #13625. It is not labelled verified, because nothing broken on base was seen fixed on the head.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sddm.sh strips pam_gnome_keyring.so auth from /etc/pam.d/sddm but not /etc/pam.d/sddm-autologin

2 participants