feat(profiles): replace old [0-9]* glob by @{int}

Beware some [0-9]* glob are actually not proper @{int}.
This commit is contained in:
Alexandre Pujol 2023-08-18 17:09:53 +01:00
parent 8ea4491a56
commit 275d6b6e62
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
368 changed files with 637 additions and 636 deletions

View file

@ -55,8 +55,8 @@ profile cockpit-bridge @{exec_path} {
@{run}/user/@{uid}/ssh-agent.[0-9A-Z]* rw,
@{run}/utmp r,
@{sys}/devices/**/hwmon[0-9]*/ r,
@{sys}/devices/**/hwmon[0-9]*/{name,temp*} r,
@{sys}/devices/**/hwmon@{int}/ r,
@{sys}/devices/**/hwmon@{int}/{name,temp*} r,
@{sys}/fs/cgroup/*.slice/**/memory* r,
@{PROC}/ r,

View file

@ -30,8 +30,8 @@ profile cockpit-pcp @{exec_path} {
@{sys}/fs/cgroup/{,**/} r,
@{sys}/fs/cgroup/**/{memory,cpu}* r,
@{sys}/devices/platform/**/hwmon/hwmon[0-9]*/temp* r,
@{sys}/devices/platform/**/hwmon/hwmon[0-9]*/fan* r,
@{sys}/devices/platform/**/hwmon/hwmon@{int}/temp* r,
@{sys}/devices/platform/**/hwmon/hwmon@{int}/fan* r,
@{PROC}/diskstats r,
@{PROC}/swaps r,

View file

@ -77,7 +77,7 @@ profile containerd @{exec_path} flags=(attach_disconnected) {
/var/lib/kubelet/seccomp/{,**} r,
/var/lib/security-profiles-operator/{,**} r,
/var/log/pods/**/[0-9]*.log{,*} w,
/var/log/pods/**/@{int}.log{,*} w,
@{run}/calico/ w,
@{run}/containerd/{,**} rwk,
@ -106,7 +106,7 @@ profile containerd @{exec_path} flags=(attach_disconnected) {
/dev/bus/ r,
/dev/char/ r,
/dev/cpu/ r,
/dev/cpu/[0-9]*/ r,
/dev/cpu/@{int}/ r,
/dev/dma_heap/ r,
/dev/dri/ r,
/dev/dri/by-path/ r,

View file

@ -36,7 +36,7 @@ profile containerd-shim-runc-v2 @{exec_path} flags=(attach_disconnected) {
/tmp/pty[0-9]*/pty.sock rw,
@{run}/containerd/{,containerd.sock.ttrpc} rw,
@{run}/containerd/io.containerd.grpc.v1.cri/containers/@{hex}/io/[0-9]*/@{hex}-{stdin,stdout,stderr} rw,
@{run}/containerd/io.containerd.grpc.v1.cri/containers/@{hex}/io/@{int}/@{hex}-{stdin,stdout,stderr} rw,
@{run}/containerd/io.containerd.runtime.v2.task/{moby,k8s.io}/@{hex}/{,*} rw,
@{run}/containerd/s/{,@{hex}} rw,

View file

@ -85,7 +85,7 @@ profile k3s @{exec_path} flags=(attach_disconnected) {
/var/log/kubernetes/audit/** rw,
/var/log/pods/{,**} r,
/var/log/pods/{,**/} rw,
/var/log/pods/**/[0-9]*.log{,*} rw,
/var/log/pods/**/@{int}.log{,*} rw,
owner @{HOME}/.kube/** rw,
@ -136,14 +136,14 @@ profile k3s @{exec_path} flags=(attach_disconnected) {
@{sys}/devices/pci[0-9]*/**/net/*/{address,mtu,speed} r,
@{sys}/devices/system/edac/mc/ r,
@{sys}/devices/system/cpu/cpu[0-9]*/cache/{,**} r,
@{sys}/devices/system/cpu/cpu[0-9]*/topology/{,**} r,
@{sys}/devices/system/cpu/cpufreq/policy[0-9]*/cpuinfo_max_freq r,
@{sys}/devices/system/cpu/cpu@{int}/cache/{,**} r,
@{sys}/devices/system/cpu/cpu@{int}/topology/{,**} r,
@{sys}/devices/system/cpu/cpufreq/policy@{int}/cpuinfo_max_freq r,
@{sys}/devices/system/cpu/present{,/} r,
@{sys}/devices/system/node/ r,
@{sys}/devices/system/node/node[0-9]*/ r,
@{sys}/devices/system/node/node[0-9]*/{cpumap,distance,meminfo} r,
@{sys}/devices/system/node/node[0-9]*/hugepages/{,**} r,
@{sys}/devices/system/node/node@{int}/ r,
@{sys}/devices/system/node/node@{int}/{cpumap,distance,meminfo} r,
@{sys}/devices/system/node/node@{int}/hugepages/{,**} r,
@{sys}/devices/virtual/block/*/** r,
@{sys}/devices/virtual/dmi/id/* r,
@ -169,7 +169,7 @@ profile k3s @{exec_path} flags=(attach_disconnected) {
@{sys}/module/apparmor/parameters/enabled r,
/dev/kmsg r,
/dev/pts/[0-9]* rw,
/dev/pts/@{int} rw,
include if exists <local/k3s>
}

View file

@ -207,20 +207,20 @@ profile libvirtd @{exec_path} flags=(attach_disconnected) {
@{sys}/devices/pci[0-9]*/**/resource r,
@{sys}/devices/pci[0-9]*/**/sriov_totalvfs r,
@{sys}/devices/system/cpu/cpu[0-9]*/cache/{,**} r,
@{sys}/devices/system/cpu/cpu[0-9]*/topology/{,**} r,
@{sys}/devices/system/cpu/cpu@{int}/cache/{,**} r,
@{sys}/devices/system/cpu/cpu@{int}/topology/{,**} r,
@{sys}/devices/system/cpu/present r,
@{sys}/devices/system/cpu/present/ r,
@{sys}/devices/system/node/ r,
@{sys}/devices/system/node/node[0-9]*/ r,
@{sys}/devices/system/node/node[0-9]*/{cpumap,distance,meminfo} r,
@{sys}/devices/system/node/node[0-9]*/hugepages/{,**} r,
@{sys}/devices/system/node/node@{int}/ r,
@{sys}/devices/system/node/node@{int}/{cpumap,distance,meminfo} r,
@{sys}/devices/system/node/node@{int}/hugepages/{,**} r,
@{sys}/devices/virtual/dmi/id/* r,
@{sys}/devices/virtual/net/{,**} rw,
@{sys}/kernel/debug/kvm/{,**} r,
@{sys}/kernel/iommu_groups/ r,
@{sys}/kernel/iommu_groups/[0-9]*/devices/ r,
@{sys}/kernel/iommu_groups/@{int}/devices/ r,
@{sys}/kernel/mm/hugepages/{,**} r,
@{sys}/kernel/security/apparmor/profiles r,
@ -258,7 +258,7 @@ profile libvirtd @{exec_path} flags=(attach_disconnected) {
/dev/mapper/control rw,
/dev/net/tun rw,
/dev/shm/libvirt/{,**} rw,
/dev/vfio/[0-9]* rwk,
/dev/vfio/@{int} rwk,
/dev/vhost-net rw,
/dev/ptmx rw,

View file

@ -35,7 +35,7 @@ profile virtinterfaced @{exec_path} flags=(attach_disconnected) {
@{sys}/class/net/ r,
@{sys}/devices/pci[0-9]*/**/net/{,**} r,
@{sys}/devices/system/node/ r,
@{sys}/devices/system/node/node[0-9]*/meminfo r,
@{sys}/devices/system/node/node@{int}/meminfo r,
@{sys}/devices/virtual/net/{,**} r,
owner @{PROC}/@{pids}/stat r,

View file

@ -34,7 +34,7 @@ profile virtlogd @{exec_path} flags=(attach_disconnected) {
@{run}/virtlogd.pid rwk,
@{sys}/devices/system/node/ r,
@{sys}/devices/system/node/node[0-9]*/meminfo r,
@{sys}/devices/system/node/node@{int}/meminfo r,
@{PROC}/1/environ r,
@{PROC}/cmdline r,

View file

@ -27,7 +27,7 @@ profile virtnetworkd @{exec_path} flags=(attach_disconnected) {
owner @{run}/user/@{uid}/libvirt/virtnetworkd* rwk,
@{sys}/devices/system/node/ r,
@{sys}/devices/system/node/node[0-9]*/meminfo r,
@{sys}/devices/system/node/node@{int}/meminfo r,
owner @{PROC}/@{pid}/stat r,
owner @{PROC}/@{pids}/fd/ r,

View file

@ -52,7 +52,7 @@ profile virtnodedevd @{exec_path} flags=(attach_disconnected) {
@{run}/udev/data/c29:[0-9]* r, # For /dev/fb[0-9]*
@{run}/udev/data/c90:[0-9]* r, # For RAM, ROM, Flash
@{run}/udev/data/c116:[0-9]* r, # For ALSA
@{run}/udev/data/c226:[0-9]* r, # For /dev/dri/card[0-9]*
@{run}/udev/data/c226:[0-9]* r, # For /dev/dri/card@{int}
@{run}/udev/data/c23[4-9]:[0-9]* r, # For dynamic assignment range 234 to 254
@{run}/udev/data/c24[0-9]:[0-9]* r,
@{run}/udev/data/c25[0-4]:[0-9]* r,
@ -70,11 +70,11 @@ profile virtnodedevd @{exec_path} flags=(attach_disconnected) {
@{sys}/devices/pci[0-9]*/**/numa_node r,
@{sys}/devices/pci[0-9]*/**/sriov_totalvfs r,
@{sys}/devices/system/node/ r,
@{sys}/devices/system/node/node[0-9]*/meminfo r,
@{sys}/devices/system/node/node@{int}/meminfo r,
@{sys}/devices/virtual/dmi/id/{product_name,sys_vendor,board_vendor,bios_vendor,bios_date,bios_version,product_version} r,
@{sys}/devices/virtual/net/{,**} r,
@{sys}/kernel/iommu_groups/ r,
@{sys}/kernel/iommu_groups/[0-9]*/devices/ r,
@{sys}/kernel/iommu_groups/@{int}/devices/ r,
owner @{PROC}/@{pid}/fd/ r,
owner @{PROC}/@{pid}/stat r,

View file

@ -30,7 +30,7 @@ profile virtsecretd @{exec_path} flags=(attach_disconnected) {
@{run}/utmp rk,
@{sys}/devices/system/node/ r,
@{sys}/devices/system/node/node[0-9]*/meminfo r,
@{sys}/devices/system/node/node@{int}/meminfo r,
owner @{PROC}/@{pids}/stat r,

View file

@ -38,7 +38,7 @@ profile virtstoraged @{exec_path} flags=(attach_disconnected) {
@{run}/utmp rwk,
@{sys}/devices/system/node/ r,
@{sys}/devices/system/node/node[0-9]*/meminfo r,
@{sys}/devices/system/node/node@{int}/meminfo r,
owner @{PROC}/@{pids}/stat r,
owner @{PROC}/@{pids}/fd/ r,