Skip to content

tools: aurora-touchid: keep the distro polkit stack; remove only our polkit-1 - #2988

Draft
Alyx-ML wants to merge 1 commit into
aurora-silicon:mainfrom
Alyx-ML:aurora/touchid-polkit
Draft

Alyx-ML wants to merge 1 commit into
aurora-silicon:mainfrom
Alyx-ML:aurora/touchid-polkit

Conversation

@Alyx-ML

@Alyx-ML Alyx-ML commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Part of the #2755 split. Draft until it has a run on a Mac (the last Evidence line says which).

Summary

 configure_pam
-  write our own /etc/pam.d/polkit-1
+  no polkit-1: write the system-auth stack;  a packaged copy: copy it once;  an admin's file: keep it
 remove_pam
+  delete polkit-1 only if it is ours

Evidence

  • Before: the setup replaced the distribution's polkit PAM stack. A host harness fails 6 of
    its 13 checks on the old script.
  • After: the harness passes 13/13. test_touchid_setup.py passes 50/50 in the fork:
    passed, Extra host tests, SEP source checks.
  • Needed before merging: on a Mac with Touch ID, the setup, a polkit prompt (for example
    pkexec true), and the removal.

Merge Danger

Door: two-way

Blast Radius: polkit sign-in prompts

…polkit-1

Without /etc/pam.d/polkit-1, aurora-touchid-setup wrote its own stack:
pam_fprintd, then bare pam_unix lines for auth, account, password and
session. That file overrides the polkit package's stack in /usr/lib/pam.d.
It dropped what system-auth adds, such as pam_faillock and the account
checks. --remove then took out only the fingerprint line, so the bare stack
stayed for good.

Now the script copies /usr/lib/pam.d/polkit-1 when there is one, and
adds only the pam_fprintd line. Otherwise it writes Arch's polkit-1
stack (include system-auth). The file starts with a marker line.
--remove deletes /etc/pam.d/polkit-1 only when it carries that marker.
An admin's own file is edited back as before and never deleted.

Verified: a host harness runs configure_pam and remove_pam in a fake root
(a GNU sed -i stand-in, sudo off) for three cases. With no polkit-1: the
system-auth stack, then deleted again. With a packaged copy: it is copied,
and a second run adds no second line. With an admin's file: it is kept.
13/13 checks pass. The same harness fails 6 checks on the old script.
shellcheck is not installed here. bash -n passes.

Signed-off-by: Alyx-ML <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor

@Alyx-ML checking open drafts today. To come out of draft, this still needs:

  • A test run at the current head on a Mac with the hardware it touches, then mark it ready for review.

If it's no longer needed, say so here and we'll close it. Otherwise it stays open as a draft until these are done.

@Alyx-ML

Alyx-ML commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for checking. This is still needed, and it merges cleanly with main. It stays a draft
until someone with a Mac runs the test under "Needed before merging" in the description.

Assisted-by: LLM (Claude:Opus 5.5)

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants