Repository navigation
fix(packaging): refresh the PAM profile on deb upgrade - #228
Merged
Merged
Conversation
Upgrades from 1.4.2 kept "auth sufficient libbiopass_pam.so" in /etc/pam.d/common-auth, because postinst only ran ldconfig. Run pam-auth-update --package on configure, as libpam-fprintd does, so an enabled profile is rewritten to [success=N default=ignore]. --package never enables a Default: no profile, so opt-in stays opt-in.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Users upgrading from 1.4.2 keep the old
auth sufficient libbiopass_pam.soline in/etc/pam.d/common-auth, because postinst only ranldconfig, so the[success=end default=ignore]profile from #226 never reached them. postinst now runspam-auth-update --packageonconfigure, the same call libpam-fprintd's postinst makes. Follow-up to #226 (known gap listed there).Closes: N/A / Discussion: #221
Changes
Install scripts:
app/src-tauri/scripts/deb/postinst: onconfigure, afterldconfig, runpam-auth-update --packageif the command exists.--packageonly re-renders profiles that are already enabled; it never enables aDefault: noprofile such as ours, so the opt-in policy is unchanged. From/usr/sbin/pam-auth-update:--packageonly sets$packageand lowers the prompt priority; the enabled list comes from the currentcommon-*files; the only profiles added areDefault eq 'yes'ones not seen before. Hand-editedcommon-*files are left alone ("Local modifications ... not updating", exit 0).pam-auth-updateitself fails, postinst fails (set -e), as libpam-fprintd's does.Verification
Scratch root only (
unshare --map-root-user,pam-auth-update --root <scratch>, private debconf DB; host/etc/pam.dnot touched):Argument handling (stubbed
ldconfigandpam-auth-update):bash -nOK;checkbashisms -f -prc=0. shellcheck runs in CI.Manual testing:
.deb/.rpm/AUR/source)Not tested: a real
dpkg -iupgrade from 1.4.2 in a VM (debconf prompt as users see it; with--packageit is medium priority, hidden at the default high priority), and the rpm path (no change there; Fedora uses authselect).Review report
Small root-run script change. Reviewed by the author against
/usr/sbin/pam-auth-update(quoted above) and libpam-fprintd's postinst. The earlier security review of #226 flagged this gap ("upgrading users keep the oldsufficientline") as minor.Risk
What could break, and for whom: deb installs/upgrades on Debian/Ubuntu: if
pam-auth-updatefails, package configuration fails (same as libpam-fprintd). Admins who hand-editedcommon-*keep their files.How to revert
git revertand a new release. Users who already got the new line keep it (it is the intended line); nothing else to undo.Checklist