Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy: Don't copy xattrs for devicetree #3323

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cgwalters
Copy link
Member

@cgwalters cgwalters commented Oct 18, 2024

xref: coreos/fedora-coreos-tracker#1808

For the kernel/initramfs that we copy to /boot
we use an explicit relabeling today, ignoring the source SELinux
context.

When we added handling for devicetree it reuse the copy_dir_recurse
we have for etc handling, and that copied the source xattrs.

Let's ensure that the devicetree is also boot_t by not copying
xattrs and relying on the default labeling.

@cgwalters
Copy link
Member Author

Only compile tested so far

xref: coreos/fedora-coreos-tracker#1808

For the kernel/initramfs that we copy to `/boot`
we use an explicit relabeling today, ignoring the source SELinux
context.

When we added handling for devicetree it reuse the `copy_dir_recurse`
we have for `etc` handling, and that copied the source xattrs.

Let's ensure that the devicetree is also `boot_t` by *not* copying
xattrs and relying on the default labeling.

Signed-off-by: Colin Walters <[email protected]>
@HuijingHei
Copy link
Collaborator

Do testing on aarch64 with this patch, after finalize-staged, the /boot/ostree/fedora-coreos-*/dtb are labeled with boot_t.

with the patch:

$ sudo /usr/bin/ostree admin finalize-staged
$ sudo restorecon -vnr /boot/ostree/

without this patch:

$ sudo /usr/bin/ostree admin finalize-staged
$ sudo restorecon -vnr /boot/ostree/ | wc -l
1866

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.

2 participants