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

Fix microos build #14

Merged
merged 1 commit into from
Oct 11, 2023
Merged

Fix microos build #14

merged 1 commit into from
Oct 11, 2023

Conversation

cmurphy
Copy link
Contributor

@cmurphy cmurphy commented Sep 21, 2023

microos uses newer SELinux packages than centos7/8 and is hitting a change in container-selinux that altered the signature for the container_domain_template macro[1]. Update the policy file to account for the changes.

[1] containers/container-selinux@24e5784

microos uses newer SELinux packages than centos7/8 and is hitting a
change in container-selinux that altered the signature for the
container_domain_template macro[1]. Update the policy file to account
for the changes.

[1] containers/container-selinux@24e5784
@cmurphy
Copy link
Contributor Author

cmurphy commented Sep 21, 2023

cc @johanneskastl

@cmurphy cmurphy mentioned this pull request Sep 21, 2023
@cmurphy cmurphy requested review from tomleb and andypitcher and removed request for tomleb September 21, 2023 21:55
@andypitcher andypitcher self-assigned this Oct 11, 2023
Copy link
Contributor

@andypitcher andypitcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, the changes provided in this PR fixe the compilation of rancher.te.

container_domain_template template now takes container as template_rules, and type container_file_t to be declared.

Here is the diff between the new rancher.te (the one that applies the new template's reqs) and the old rancher.te (that makes the compilation of microos rancher.te policy to fail):

24ea68a0ba04:~/policy/microos # diff rancher.te /tmp/rancher.te_old
5d4
<     type container_file_t;
18c17
< container_domain_template(rke_kubereader, container)
---
> container_domain_template(rke_kubereader)
37c36
< container_domain_template(rke_logreader, container)
---
> container_domain_template(rke_logreader)
64c63
< container_domain_template(rke_container, container)
---
> container_domain_template(rke_container)
96c95
< container_domain_template(rke_network, container)
---
> container_domain_template(rke_network)
24ea68a0ba04:~/policy/microos # make -f /usr/share/selinux/devel/Makefile rancher.pp
Compiling targeted rancher module
Creating targeted rancher.pp policy package
rm tmp/rancher.mod.fc tmp/rancher.mod

@andypitcher andypitcher merged commit 24e5172 into rancher:main Oct 11, 2023
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