Skip to content

Commit

Permalink
Fix container_unit_file_t for rke2 unit file (#57)
Browse files Browse the repository at this point in the history
Signed-off-by: galal-hussein <[email protected]>
  • Loading branch information
galal-hussein authored Oct 30, 2023
1 parent 4cd88c8 commit b5a602a
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 10 deletions.
4 changes: 2 additions & 2 deletions policy/centos7/rke2-selinux.spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ mkdir -p /var/lib/rancher/rke2/agent/containerd/io.containerd.snapshotter.v1.ove
mkdir -p /var/lib/rancher/rke2/data; \
mkdir -p /var/run/flannel; \
mkdir -p /var/run/k3s; \
restorecon -R -i /etc/systemd/system/rke2.service; \
restorecon -R -i /usr/lib/systemd/system/rke2.service; \
restorecon -R -i /etc/systemd/system/rke2*; \
restorecon -R -i /usr/lib/systemd/system/rke2*; \
restorecon -R /var/lib/cni; \
restorecon -R /opt/cni; \
restorecon -R /var/lib/kubelet; \
Expand Down
1 change: 1 addition & 0 deletions policy/centos7/rke2.fc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/etc/systemd/system/rke2.* -- gen_context(system_u:object_r:container_unit_file_t,s0)
/lib/systemd/system/rke2.* -- gen_context(system_u:object_r:container_unit_file_t,s0)
/usr/local/lib/systemd/system/rke2.* -- gen_context(system_u:object_r:container_unit_file_t,s0)
/usr/lib/systemd/system/rke2.* -- gen_context(system_u:object_r:container_unit_file_t,s0)
/usr/bin/rke2 -- gen_context(system_u:object_r:container_runtime_exec_t,s0)
/usr/local/bin/rke2 -- gen_context(system_u:object_r:container_runtime_exec_t,s0)
/var/lib/cni(/.*)? gen_context(system_u:object_r:container_var_lib_t,s0)
Expand Down
4 changes: 2 additions & 2 deletions policy/centos8/rke2-selinux.spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ mkdir -p /var/lib/rancher/rke2/agent/containerd/io.containerd.snapshotter.v1.ove
mkdir -p /var/lib/rancher/rke2/data; \
mkdir -p /var/run/flannel; \
mkdir -p /var/run/k3s; \
restorecon -R -i /etc/systemd/system/rke2.service; \
restorecon -R -i /usr/lib/systemd/system/rke2.service; \
restorecon -R -i /etc/systemd/system/rke2*; \
restorecon -R -i /usr/lib/systemd/system/rke2*; \
restorecon -R /var/lib/cni; \
restorecon -R /opt/cni; \
restorecon -R /var/lib/kubelet; \
Expand Down
1 change: 1 addition & 0 deletions policy/centos8/rke2.fc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/etc/systemd/system/rke2.* -- gen_context(system_u:object_r:container_unit_file_t,s0)
/lib/systemd/system/rke2.* -- gen_context(system_u:object_r:container_unit_file_t,s0)
/usr/local/lib/systemd/system/rke2.* -- gen_context(system_u:object_r:container_unit_file_t,s0)
/usr/lib/systemd/system/rke2.* -- gen_context(system_u:object_r:container_unit_file_t,s0)
/usr/bin/rke2 -- gen_context(system_u:object_r:container_runtime_exec_t,s0)
/usr/local/bin/rke2 -- gen_context(system_u:object_r:container_runtime_exec_t,s0)
#/var/lib/cni(/.*)? gen_context(system_u:object_r:container_var_lib_t,s0)
Expand Down
5 changes: 3 additions & 2 deletions policy/centos9/rke2-selinux.spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ mkdir -p /var/lib/rancher/rke2/agent/containerd/io.containerd.snapshotter.v1.ove
mkdir -p /var/lib/rancher/rke2/data; \
mkdir -p /var/run/flannel; \
mkdir -p /var/run/k3s; \
restorecon -R -i /etc/systemd/system/rke2.service; \
restorecon -R -i /usr/lib/systemd/system/rke2.service; \
restorecon -R -i /etc/systemd/system/rke2*; \
restorecon -R -i /usr/local/lib/systemd/system/rke2*; \
restorecon -R -i /usr/lib/systemd/system/rke2*; \
restorecon -R /var/lib/cni; \
restorecon -R /opt/cni; \
restorecon -R /var/lib/kubelet; \
Expand Down
1 change: 1 addition & 0 deletions policy/centos9/rke2.fc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/etc/systemd/system/rke2.* -- gen_context(system_u:object_r:container_unit_file_t,s0)
/lib/systemd/system/rke2.* -- gen_context(system_u:object_r:container_unit_file_t,s0)
/usr/local/lib/systemd/system/rke2.* -- gen_context(system_u:object_r:container_unit_file_t,s0)
/usr/lib/systemd/system/rke2.* -- gen_context(system_u:object_r:container_unit_file_t,s0)
/usr/bin/rke2 -- gen_context(system_u:object_r:container_runtime_exec_t,s0)
/usr/local/bin/rke2 -- gen_context(system_u:object_r:container_runtime_exec_t,s0)
#/var/lib/cni(/.*)? gen_context(system_u:object_r:container_var_lib_t,s0)
Expand Down
4 changes: 2 additions & 2 deletions policy/microos/rke2-selinux.spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ mkdir -p /var/lib/rancher/rke2/agent/containerd/io.containerd.snapshotter.v1.ove
mkdir -p /var/lib/rancher/rke2/data; \
mkdir -p /var/run/flannel; \
mkdir -p /var/run/k3s; \
restorecon -R -i /etc/systemd/system/rke2.service; \
restorecon -R -i /usr/lib/systemd/system/rke2.service; \
restorecon -R -i /etc/systemd/system/rke2*; \
restorecon -R -i /usr/lib/systemd/system/rke2*; \
restorecon -R /var/lib/cni; \
restorecon -R /opt/cni; \
restorecon -R /var/lib/kubelet; \
Expand Down
1 change: 1 addition & 0 deletions policy/microos/rke2.fc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/etc/systemd/system/rke2.* -- gen_context(system_u:object_r:container_unit_file_t,s0)
/lib/systemd/system/rke2.* -- gen_context(system_u:object_r:container_unit_file_t,s0)
/usr/local/lib/systemd/system/rke2.* -- gen_context(system_u:object_r:container_unit_file_t,s0)
/usr/lib/systemd/system/rke2.* -- gen_context(system_u:object_r:container_unit_file_t,s0)
/usr/bin/rke2 -- gen_context(system_u:object_r:container_runtime_exec_t,s0)
/usr/local/bin/rke2 -- gen_context(system_u:object_r:container_runtime_exec_t,s0)
#/var/lib/cni(/.*)? gen_context(system_u:object_r:container_var_lib_t,s0)
Expand Down
4 changes: 2 additions & 2 deletions policy/slemicro/rke2-selinux.spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ mkdir -p /var/lib/rancher/rke2/agent/containerd/io.containerd.snapshotter.v1.ove
mkdir -p /var/lib/rancher/rke2/data; \
mkdir -p /var/run/flannel; \
mkdir -p /var/run/k3s; \
restorecon -R -i /etc/systemd/system/rke2.service; \
restorecon -R -i /usr/lib/systemd/system/rke2.service; \
restorecon -R -i /etc/systemd/system/rke2*; \
restorecon -R -i /usr/lib/systemd/system/rke2*; \
restorecon -R /var/lib/cni; \
restorecon -R /opt/cni; \
restorecon -R /var/lib/kubelet; \
Expand Down
1 change: 1 addition & 0 deletions policy/slemicro/rke2.fc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/etc/systemd/system/rke2.* -- gen_context(system_u:object_r:container_unit_file_t,s0)
/lib/systemd/system/rke2.* -- gen_context(system_u:object_r:container_unit_file_t,s0)
/usr/local/lib/systemd/system/rke2.* -- gen_context(system_u:object_r:container_unit_file_t,s0)
/usr/lib/systemd/system/rke2.* -- gen_context(system_u:object_r:container_unit_file_t,s0)
/usr/bin/rke2 -- gen_context(system_u:object_r:container_runtime_exec_t,s0)
/usr/local/bin/rke2 -- gen_context(system_u:object_r:container_runtime_exec_t,s0)
/opt/rke2/bin/rke2 -- gen_context(system_u:object_r:container_runtime_exec_t,s0)
Expand Down

0 comments on commit b5a602a

Please sign in to comment.