From a13f82c59456574238a75959ff395746c93f1cfa Mon Sep 17 00:00:00 2001 From: Dmitry Sharshakov Date: Wed, 30 Oct 2024 08:39:43 +0100 Subject: [PATCH] feat: udev: label device nodes Use udev rules to assign basic device file labels based on their subsystem Signed-off-by: Dmitry Sharshakov --- Dockerfile | 2 ++ hack/udevd/90-selinux.rules | 11 ++++++ internal/integration/api/selinux.go | 32 +++++++++++++++--- internal/pkg/selinux/policy/policy.33 | Bin 26812 -> 27068 bytes .../selinux/policy/selinux/services/udev.cil | 14 ++++++++ 5 files changed, 54 insertions(+), 5 deletions(-) create mode 100644 hack/udevd/90-selinux.rules diff --git a/Dockerfile b/Dockerfile index 8dd4600de1..6398ce68e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -731,6 +731,7 @@ COPY --chmod=0644 hack/containerd.toml /rootfs/etc/containerd/config.toml COPY --chmod=0644 hack/cri-containerd.toml /rootfs/etc/cri/containerd.toml COPY --chmod=0644 hack/cri-plugin.part /rootfs/etc/cri/conf.d/00-base.part COPY --chmod=0644 hack/udevd/80-net-name-slot.rules /rootfs/usr/lib/udev/rules.d/ +COPY --chmod=0644 hack/udevd/90-selinux.rules /rootfs/usr/lib/udev/rules.d/ COPY --chmod=0644 hack/lvm.conf /rootfs/etc/lvm/lvm.conf RUN <tKDU|?X`JkimIY4b~G7e;P-Bpo`gwaWF( yKwE&o0Zal3po>B51|VhvVlY5g1C($8N;Cj5PBknnB0&m#|AV9=u7~N-ZnM> delta 114 zcmdmUnQ_lW#tqEcteFf944IQTwBKyj(Xn9L++ehlakHyQCL?3!=JlrE7&mV;*J0#I zXUJq=V_;+uU|?X`eAnUt8>c-`gbBz`-#p7cnrSnmlMfSDC`^oDv$u;I