Repository navigation
tools/aurora-sep: policy-change: don't crash where restorecon is missing - #1189
Merged
RyanTheTide merged 1 commit intoNov 8, 2026
Conversation
arm() writes the one-boot allowance, fsyncs it, and then relabels it
with restorecon, ignoring its exit status (check=False). On a
distribution without SELinux, such as Arch Linux ARM (the Arch package
ships this tool), there is no restorecon, so subprocess.run() raises
FileNotFoundError and the tool dies with a traceback after the
allowance is already in place. The reboot then works, but the user is
told the tool failed and never sees "Reboot to finish."
Relabel only when restorecon exists. The Fedora spec also guards its
own restorecon calls, with selinuxenabled.
tests/test_policy_change.py arms an allowance with no restorecon on
PATH. It fails before this change and passes after it.
Tested on a J616s (T6040, Arch Linux ARM). The allowance the old tool
armed before its crash was used on the next boot ("allowed one rewrite
of kind-4 record ..."), and Touch ID came back.
Fixes: ff7f73d ("tools/aurora-sep: keep Touch ID across a boot policy change, and never hold the boot for it")
Signed-off-by: Jonathan Goyvaerts <[email protected]>
Assisted-by: LLM
RyanTheTide
merged commit Nov 8, 2026
8048b5c
into
aurora-silicon:integration/aurora
3 checks passed
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.
aurora-sep-policy-changecrashes on distributions without SELinux, after it has already armed the allowance:arm()writes and fsyncs the one-boot allowance, then runsrestoreconon it withcheck=False.check=Falsedoesn't cover a missing program, so on Arch Linux ARM (whose package ships this tool) the user gets a traceback instead of "armed: … Reboot to finish." The allowance is in place and the reboot works, but the tool says it failed.Change
Run
restorecononly whenshutil.whichfinds it. The Fedora spec also guards its ownrestoreconcalls, withselinuxenabled. On Fedora nothing changes:shutil.whichsearches the same PATH thatsubprocess.runused.Testing
tests/test_policy_change.pyarms an allowance with norestoreconon PATH. It fails onintegration/aurora(FileNotFoundError) and passes with this change:python3 -m unittest discover -s tools/aurora-sep/tests -p test_policy_change.py -v.xART guard: allowed one rewrite of kind-4 record … for a boot policy change), and Touch ID came back (Touch ID: restored 1 enrolled identity).🤖 Generated with Claude Code