Skip to content

fix(pam): correct success=end → success=done across all 9 sites#31

Merged
ccross2 merged 1 commit into
mainfrom
fix/pam-success-keyword-fleet-sweep
May 28, 2026
Merged

fix(pam): correct success=end → success=done across all 9 sites#31
ccross2 merged 1 commit into
mainfrom
fix/pam-success-keyword-fleet-sweep

Conversation

@ccross2
Copy link
Copy Markdown
Contributor

@ccross2 ccross2 commented May 28, 2026

Summary

pam.conf(5) documents exactly ignore | bad | die | ok | done | reset | N as the legal value-keywords inside the [control=value …] syntax. end is not in that list. libpam logs a warning and silently treats the unknown keyword as ignore, which means PAM_SUCCESS from pam_visage.so was being dropped and the stack fell through to whatever came next (typically pam_unix.so → password prompt). Effectively: face auth has been working as if Visage weren't installed, since v0.1.0.

This sweeps the 11 occurrences in 9 files:

File Count Surface
README.md 1 Arch install instructions
docs/operations-guide.md 2 Setup + verification
docs/architecture.md 1 PAM stack integration narrative
docs/research/architecture-review-and-roadmap.md 2 Roadmap context
docs/research/domain-audit.md 1 Implementation plan
docs/research/howdy-analysis-and-visage-design.md 1 Design comparison
packaging/debian/pam-auth-update 1 Ubuntu profile (live config)
packaging/nix/module.nix 2 NixOS module (sudo + login rules)

The Ubuntu profile and the NixOS module are the load-bearing live configs — fixing those is the actual user-impact change. The docs sweep is so users following our setup instructions today don't reintroduce the bug.

Origin

Caught by @SelfRef in #27 — the README diff there flagged it as the right fix for the Arch manual-edit case. The bug is broader than the README, so I'm landing the fleet sweep separately and leaving #27 for the other improvements (resume-unit enable, visage verify step). Attribution preserved via Reported-by: in the commit.

Existing-user impact

This is a behavior change for anyone whose PAM stack still references success=end:

  • Arch users who hand-edited /etc/pam.d/system-auth per the prior README — they need to swap the keyword in their config. The CHANGELOG entry calls this out.
  • Debian/Ubuntu .deb users from a release before this lands — their /etc/pam.d/common-auth (generated by pam-auth-update --package) contains the broken keyword and won't fix itself until the new .deb is installed AND they re-run pam-auth-update (the postinst already does this).
  • NixOS users on the affected module versions — fixed automatically on next nixos-rebuild switch.

For all of them: face auth was silently a no-op. After this fix, face match actually terminates the auth stack with success, as intended.

Test plan

  • CI: cargo fmt --all -- --check clean
  • CI: cargo clippy --workspace -- -D warnings clean
  • CI: cargo test --workspace green (this PR doesn't touch Rust code, but workspace test is the contract)
  • CI: build-deb produces a .deb cleanly with the corrected pam-auth-update profile
  • Manual smoke (Arch):
    • Edit /etc/pam.d/system-auth to use success=done
    • sudo visage enroll && sudo true — should authenticate via face without password prompt
  • Manual smoke (Ubuntu via .deb):
    • Install the freshly built .deb; postinst runs pam-auth-update --package
    • grep pam_visage /etc/pam.d/common-auth shows success=done
    • sudo true authenticates via face

CHANGELOG

Entry added under [Unreleased] > Fixed with the existing-user upgrade note.

Related

🤖 Generated with Claude Code

`pam.conf(5)` documents exactly `ignore | bad | die | ok | done | reset | N`
as the legal value-keywords for the `[control=value …]` syntax. `end` is not
in that list — libpam logs a warning and silently treats the unknown keyword
as `ignore`, which means a successful face match (`PAM_SUCCESS` from
`pam_visage.so`) was being dropped and the stack fell through to the next
auth rule. In practice, users with the documented setup were still seeing a
password prompt on every authentication; face auth appeared to succeed but
had no effect on the stack flow.

This has shipped since v0.1.0. The bug appeared in 9 places (some files
contained two occurrences):

  README.md
  docs/architecture.md
  docs/operations-guide.md           (×2)
  docs/research/architecture-review-and-roadmap.md  (×2)
  docs/research/domain-audit.md
  docs/research/howdy-analysis-and-visage-design.md
  packaging/debian/pam-auth-update
  packaging/nix/module.nix           (×2: sudo + login rules)

Reported-by: @SelfRef <#27>

Existing-user impact: anyone who manually edited `/etc/pam.d/system-auth`
following the prior README (Arch path) or installed an older `.deb` /
NixOS rebuild needs to swap `success=end` for `success=done` in their
config and re-test. The CHANGELOG entry calls this out.
@ccross2 ccross2 force-pushed the fix/pam-success-keyword-fleet-sweep branch from 7e81d44 to d643a87 Compare May 28, 2026 17:01
@ccross2 ccross2 merged commit daa9903 into main May 28, 2026
3 checks passed
@ccross2 ccross2 mentioned this pull request May 28, 2026
5 tasks
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.

1 participant