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

files context for merged-usr profile on gentoo #768

Merged
merged 1 commit into from
May 9, 2024

Conversation

plsph
Copy link
Contributor

@plsph plsph commented Apr 3, 2024

As per https://wiki.gentoo.org/wiki/Merge-usr new gentoo profiles use merged-usr by default.
That also means: "/sbin and /usr/sbin are both actually merged to /usr/bin"
Hence these updates on files context.

@pebenito
Copy link
Member

pebenito commented Apr 9, 2024

Has build issues.

cc: @perfinion @0xC0ncord for comment

@0xC0ncord
Copy link
Contributor

The offending duplicate lines need to be removed to fix the build issues, but otherwise this looks good.

I'm sure there may be more of these needed changes lurking and waiting to be discovered.

@plsph
Copy link
Contributor Author

plsph commented Apr 9, 2024

Actually I'm on it. Please take a look: gentoo/hardened-refpolicy#2

@plsph
Copy link
Contributor Author

plsph commented Apr 15, 2024

@0xC0ncord Any progress with that? How can I help?

@0xC0ncord
Copy link
Contributor

0xC0ncord commented Apr 16, 2024 via email

@PPN-SD
Copy link
Contributor

PPN-SD commented Apr 17, 2024

@0xC0ncord, what is best if there are other additions ? Make a PR on the contrib gentoo repo or this repo ?
(https://bpa.st/DJOQ , contaminated by formatting for now, sorry)

@plsph
Copy link
Contributor Author

plsph commented Apr 28, 2024

Is there a chance that someone else could pickup this?

@0xC0ncord
Copy link
Contributor

@0xC0ncord, what is best if there are other additions ? Make a PR on the contrib gentoo repo or this repo ? (bpa.st/DJOQ , contaminated by formatting for now, sorry)

Sorry, when I made the comment above I was implying there may be more of these merged-usr related changes in other paths, but we will find them when we find them -- we don't need to track them all down now.

Please fix the build issues on this PR and let's get it merged here. I will have it merged into Gentoo's policy soon after.

@plsph
Copy link
Contributor Author

plsph commented Apr 28, 2024

Who should "fix the build issues on this PR"?
Regarding: "The offending duplicate lines need to be removed to fix the build issues"
I don't see output of checks.

Comment on lines 24 to 26
ifdef(`distro_gentoo',`
/usr/bin/arping -- gen_context(system_u:object_r:netutils_exec_t,s0)
/usr/bin/fping -- gen_context(system_u:object_r:ping_exec_t,s0)
/usr/bin/hping2 -- gen_context(system_u:object_r:ping_exec_t,s0)
/usr/bin/iftop -- gen_context(system_u:object_r:netutils_exec_t,s0)
/usr/bin/iptstate -- gen_context(system_u:object_r:netutils_exec_t,s0)
/usr/bin/send_arp -- gen_context(system_u:object_r:ping_exec_t,s0)
/usr/bin/tcpdump -- gen_context(system_u:object_r:netutils_exec_t,s0)
/usr/bin/traceroute.* -- gen_context(system_u:object_r:traceroute_exec_t,s0)
')
Copy link
Contributor

Choose a reason for hiding this comment

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

The build errors are coming from here:

/tmp/selinux/sbin/setfiles: file_contexts: Multiple same specifications for /usr/bin/traceroute.*.
/tmp/selinux/sbin/setfiles: file_contexts: Multiple same specifications for /usr/bin/fping.
/tmp/selinux/sbin/setfiles: file_contexts: Multiple same specifications for /usr/bin/arping.
/tmp/selinux/sbin/setfiles: file_contexts: Multiple same specifications for /usr/bin/hping2.
/tmp/selinux/sbin/setfiles: file_contexts: Multiple same specifications for /usr/bin/smartd.
/tmp/selinux/sbin/setfiles: file_contexts: Multiple same specifications for /usr/bin/tcpdump.
/tmp/selinux/sbin/setfiles: file_contexts: Multiple same specifications for /usr/bin/iptstate.
/tmp/selinux/sbin/setfiles: file_contexts: Multiple same specifications for /usr/bin/send_arp.

Remove the lines causing these errors from your PR here and it will fix them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My bad, fixed.

@0xC0ncord
Copy link
Contributor

Looks good! Please squash your commits and I think it will be ready to merge.

@plsph plsph force-pushed the merged-usr-gentoo branch from 2482283 to afca03e Compare April 30, 2024 18:47
@plsph plsph requested a review from 0xC0ncord April 30, 2024 19:11
@0xC0ncord
Copy link
Contributor

@plsph Thanks for your work!

@pebenito I think this is ready. :)

/usr/bin/rc -- gen_context(system_u:object_r:rc_exec_t,s0)
/usr/bin/openrc -- gen_context(system_u:object_r:rc_exec_t,s0)
/usr/bin/openrc-init -- gen_context(system_u:object_r:init_exec_t,s0)
/usr/bin/openrc-shutdown -- gen_context(system_u:object_r:init_exec_t,s0)
Copy link
Member

Choose a reason for hiding this comment

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

Please move to line 56, above the /usr/lib lines.

Comment on lines 24 to 26
ifdef(`distro_gentoo',`
/usr/bin/dmeventd -- gen_context(system_u:object_r:lvm_exec_t,s0)
')
Copy link
Member

Choose a reason for hiding this comment

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

Please move to line 76 (after all the /usr/bin entires), with empty lines before and after.

@plsph plsph force-pushed the merged-usr-gentoo branch from afca03e to b577962 Compare May 6, 2024 20:19
@plsph plsph requested a review from pebenito May 6, 2024 20:19
@pebenito
Copy link
Member

pebenito commented May 7, 2024

Did you add the changes when you amended your commit? GitHub's compare for the most recent force push says no changes.

@plsph plsph force-pushed the merged-usr-gentoo branch from b577962 to b9c457d Compare May 8, 2024 11:47
@plsph
Copy link
Contributor Author

plsph commented May 8, 2024

Sorry, my bad.

@pebenito pebenito merged commit eefc22e into SELinuxProject:main May 9, 2024
56 checks passed
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.

4 participants