Repository navigation
tools: aurora-sep: share the SELinux device type and let fprintd read the lid - #567
Closed
RyanTheTide wants to merge 1 commit into
Closed
RyanTheTide wants to merge 1 commit into
RyanTheTide wants to merge 1 commit into
Conversation
… the lid The fedora-aurora package builds a policy module of the same name, aurora_sep, but labels /dev/sep-bio aurora_sep_device_t where this tree says sep_bio_device_t. Only one module of a name is active per priority, so a Mac that moved from this tree's aurora-sep-selinux to the package logged "Context sep_bio_device_t became invalid" and was left with an unlabelled /dev/sep-bio, which fprintd may not open. Use the package's name. It follows the reference policy habit of prefixing a module's types with the module name. The package's module also has two rules this one lacks. libfprint's aurora build hides the reader while the lid is closed by following SW_LID on the input event devices. Under the targeted policy fprintd may not read those, logs "Cannot open /dev/input/eventN: Permission denied" and keeps offering Touch ID in clamshell. dev_read_input(fprintd_t) allows the read; the fprintd unit drop-in that libfprint ships already allows char-input for the device cgroup. The package also lets init_t open, read and query the device, for the readiness helpers its units run. Take both, so the two modules are the same policy. The README says what the input rule is for and that a module loaded by hand with semodule -i sits at priority 400 and shadows a packaged one. Bump the Fedora spec to 1-9 for the policy change, and the Arch pkgrel to 14 for the README checksum. Built with the Fedora 44 selinux-policy-devel Makefile. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Contributor
Author
|
Held: on the Neo (J700) this kit regresses Touch ID. Same kernel (7.3.0-aurora-fleet8) and Stage 2 before and after; the only change was aurora-sep 1-3 to 1-9.
So the first 1-9 run left persistent state behind. The J616s and both ref Macs are fine on 1-9. Investigating; this stays unmerged until the Neo is clean. |
Contributor
Author
|
Superseded by #584, which carries the same policy text plus the Arch sum fix and is now merged. The M2 and M1 Pro (fleet10, packaged policy at priority 200) both label /dev/sep-bio as aurora_sep_device_t. 🤖 Generated with Claude Code |
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.
This makes the SEP policy module in
tools/aurora-septhe same policy that fedora-aurora ships, so a Mac can move between the kit and the package without losing the/dev/sep-biolabel.Why
Both build a module named
aurora_sep. The kit labelled the devicesep_bio_device_tand the packageaurora_sep_device_t. Only one module of a name is active at a priority, so on a ref Mac that went from the kit'saurora-sep-selinuxto the package the kernel logged "Context sep_bio_device_t became invalid" and fprintd lost the device.The package's module also has two rules the kit lacks:
dev_read_input(fprintd_t). libfprint's aurora build hides the reader while the lid is closed by following SW_LID on the input event devices. Without the rule fprintd logs "Cannot open /dev/input/eventN: Permission denied" under the enforcing targeted policy and keeps offering Touch ID in clamshell. libfprint's own fprintd drop-in already allowschar-inputfor the device cgroup.init_tmay open, read and query the device, for the readiness helpers the units run.What changes
aurora_sep.teandaurora_sep.fcuseaurora_sep_device_t, the package's name, which also follows the habit of prefixing a module's types with its name. The two rules above are added, the fprintd ones inside the existingoptional_policy.README.mdsays what the input rule is for, and thatsemodule -iloads at priority 400 and shadows the packages' 200 until removed withsemodule -X 400 -r aurora_sep. Both ref Macs have exactly that today: a hand-loaded module at 400 overaurora-sep-selinuxat 200.packaging/fedora/aurora-sep.specgoes to 1-9 with a changelog entry. The Archpkgrelgoes to 14 for the README checksum. The Arch package does not ship the policy.Testing
tests/test_packaging.pypasses on the changed tree (Arch sums, spec sources, the label and type check).selinux-policy-develMakefile on the M1 Pro, in a temporary directory, without loading it.The distribution side:
aurora_sep.teandaurora_sep.fcinaurora-sep-selinuxand updates the rest of the package to this kit.Once this merges, the Fedora provenance can move from this branch's commit to the merged one.
🤖 Generated with Claude Code