]> git.ipfire.org Git - thirdparty/systemd.git/commit
selinux: wire up LabelContext in tmpfiles, firstboot, sysusers 42768/head
authorSimon de Vlieger <cmdr@supakeen.com>
Sat, 4 Jul 2026 11:10:21 +0000 (13:10 +0200)
committerSimon de Vlieger <cmdr@supakeen.com>
Fri, 31 Jul 2026 08:06:14 +0000 (10:06 +0200)
commitd652f6dc44bc960bb3583987a186d72a92e67d23
tree02430dd7abd4caae87135bd11a896479e3acc22c
parentf4f6a56db4b41f3a1e94fc2b1d18f662e10ca5e2
selinux: wire up LabelContext in tmpfiles, firstboot, sysusers

These three one-shot tools operate on alternate roots via --root/--image
but until now created files with host SELinux labels, producing images
that fail to boot or run with enforcing mode because every file carries
the wrong security context.

Create a LabelContext from arg_root at startup and thread it through all
labeling call sites so the target image gets labeled according to its own
policy.

Signed-off-by: Simon de Vlieger <cmdr@supakeen.com>
src/firstboot/firstboot.c
src/sysusers/sysusers.c
src/tmpfiles/tmpfiles.c