Skip to content

Commit

Permalink
c9s: work around various SELinux issues
Browse files Browse the repository at this point in the history
Recent changes in the SELinux policy to make more service confined has
broken a lot of our code. The SELinux team is working through relaxing
the policy, but in the meantime, let's revert back the affected types to
permissive mode:

1. afterburn fail when trying to write to `/run`, `/run/metadata` and
   `/home/$user/.ssh`.
   See: https://issues.redhat.com/browse/RHEL-49735
2. coreos-installer installation fails due to various denials.
   See: https://issues.redhat.com/browse/RHEL-38614
3. network functionality that rely on systemd-network-generator is
   broken due to the latter being unable to create temporary files.
   See: https://issues.redhat.com/browse/RHEL-47033

Co-authored-by: Jonathan Lebon <jonathan@jlebon.com>
  • Loading branch information
aleskandro and jlebon committed Aug 7, 2024
1 parent 2399f3f commit 9ba8b71
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions manifest-c9s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,23 @@ mutate-os-release: "9"

packages:
- centos-stream-release

postprocess:
- |
#!/usr/bin/env bash
set -xeuo pipefail
cat > /tmp/scos-workarounds.cil << EOF
; https://issues.redhat.com/browse/RHEL-49735
(typeattributeset cil_gen_require afterburn_t)
(typepermissive afterburn_t)
; https://issues.redhat.com/browse/RHEL-38614
(typeattributeset cil_gen_require coreos_installer_t)
(typepermissive coreos_installer_t)
; https://issues.redhat.com/browse/RHEL-47033
(typeattributeset cil_gen_require systemd_network_generator_t)
(typepermissive systemd_network_generator_t)
EOF
/usr/sbin/semodule -i /tmp/scos-workarounds.cil
rm /tmp/scos-workarounds.cil

0 comments on commit 9ba8b71

Please sign in to comment.