-
Notifications
You must be signed in to change notification settings - Fork 50
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
build_library: set correct SELinux contexts in final images #368
Conversation
70075fc
to
5a9381c
Compare
5a9381c
to
4a2f054
Compare
build_packages
Outdated
# build and label the system before generating torcx image. | ||
info "Label the build root" | ||
sudo chroot "${BOARD_ROOT}" bash -c "cd /usr/share/selinux/mcs && semodule -s mcs -i *.pp" | ||
sudo setfiles -Dv -r "${BOARD_ROOT}" "${BOARD_ROOT}"/etc/selinux/mcs/contexts/files/file_contexts "${BOARD_ROOT}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setfiles
is a cool idea, but doing it in build_packages
is not useful, because the images are not built from the files in BOARD_ROOT
. This would have to happen somewhere in build_image
and in build_torcx_store
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also came across this: https://github.com/gardenlinux/gardenlinux/blob/main/bin/makepart#L20-L22
b7d9a63
to
42ff444
Compare
42ff444
to
67abbed
Compare
67abbed
to
1f26e11
Compare
1f26e11
to
9a658e1
Compare
5134d91
to
b510a48
Compare
174c2a9
to
1b9c992
Compare
0eb84a0
to
d7e8a99
Compare
`setfiles` can be used to directly set the SELinux labels on a root filesystem based on the values in `file_contexts`. Signed-off-by: Mathieu Tortuyaux <[email protected]>
d7e8a99
to
759559f
Compare
Closed in favor of #666 (:imp:) |
Can you rather rebase? My PR only did the labeling for |
build_packages: use setfiles to label the system
setfiles
can be used to directly set the SELinux labels on a root filesystem based on the values infile_contexts
.