feat(profile): general update.
This commit is contained in:
parent
24b1c816e5
commit
cfccb7894d
19 changed files with 54 additions and 24 deletions
|
|
@ -9,6 +9,7 @@ include <tunables/global>
|
||||||
@{exec_path} = /usr/share/netplan/netplan.script
|
@{exec_path} = /usr/share/netplan/netplan.script
|
||||||
profile netplan.script @{exec_path} flags=(attach_disconnected) {
|
profile netplan.script @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
|
include <abstractions/nameservice-strict>
|
||||||
include <abstractions/python>
|
include <abstractions/python>
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ profile openvpn @{exec_path} flags=(attach_disconnected) {
|
||||||
@{bin}/xtables-nft-multi rix,
|
@{bin}/xtables-nft-multi rix,
|
||||||
|
|
||||||
/etc/iproute2/rt_tables r,
|
/etc/iproute2/rt_tables r,
|
||||||
/etc/iproute2/rt_tables.d/ r,
|
/etc/iproute2/rt_tables.d/{,*} r,
|
||||||
|
|
||||||
include if exists <local/openvpn_update-resolv>
|
include if exists <local/openvpn_update-resolv>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,9 @@ abi <abi/4.0>,
|
||||||
include <tunables/global>
|
include <tunables/global>
|
||||||
|
|
||||||
@{exec_path} = @{bin}/wg
|
@{exec_path} = @{bin}/wg
|
||||||
profile wg @{exec_path} {
|
profile wg @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
|
include <abstractions/nameservice-strict>
|
||||||
|
|
||||||
capability net_admin,
|
capability net_admin,
|
||||||
capability net_bind_service,
|
capability net_bind_service,
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,9 @@ abi <abi/4.0>,
|
||||||
include <tunables/global>
|
include <tunables/global>
|
||||||
|
|
||||||
@{exec_path} = @{bin}/wg-quick
|
@{exec_path} = @{bin}/wg-quick
|
||||||
profile wg-quick @{exec_path} {
|
profile wg-quick @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
|
include <abstractions/consoles>
|
||||||
|
|
||||||
capability dac_read_search,
|
capability dac_read_search,
|
||||||
capability net_admin,
|
capability net_admin,
|
||||||
|
|
@ -20,13 +21,16 @@ profile wg-quick @{exec_path} {
|
||||||
@{sh_path} rix,
|
@{sh_path} rix,
|
||||||
@{bin}/cat rix,
|
@{bin}/cat rix,
|
||||||
@{bin}/ip rPx,
|
@{bin}/ip rPx,
|
||||||
|
@{bin}/mv rix,
|
||||||
@{bin}/nft rix,
|
@{bin}/nft rix,
|
||||||
@{bin}/readlink rix,
|
@{bin}/readlink rix,
|
||||||
@{bin}/resolvconf rPx,
|
@{bin}/resolvconf rPx,
|
||||||
@{bin}/resolvectl rPUx,
|
@{bin}/resolvectl rPx,
|
||||||
|
@{bin}/rm rix,
|
||||||
@{bin}/sort rix,
|
@{bin}/sort rix,
|
||||||
@{bin}/stat rix,
|
@{bin}/stat rix,
|
||||||
@{bin}/sysctl rix,
|
@{bin}/sync rix,
|
||||||
|
@{bin}/sysctl rCx -> sysctl,
|
||||||
@{bin}/wg rPx,
|
@{bin}/wg rPx,
|
||||||
@{bin}/xtables-nft-multi rix,
|
@{bin}/xtables-nft-multi rix,
|
||||||
|
|
||||||
|
|
@ -35,16 +39,21 @@ profile wg-quick @{exec_path} {
|
||||||
/etc/iproute2/group r,
|
/etc/iproute2/group r,
|
||||||
/etc/iproute2/rt_realms r,
|
/etc/iproute2/rt_realms r,
|
||||||
/etc/resolvconf/interface-order r,
|
/etc/resolvconf/interface-order r,
|
||||||
/etc/wireguard/*.conf r,
|
/etc/wireguard/{,**} rw,
|
||||||
|
|
||||||
@{sys}/module/wireguard r,
|
@{sys}/module/wireguard r,
|
||||||
|
|
||||||
@{PROC}/sys/net/ipv4/conf/all/src_valid_mark w,
|
@{PROC}/@{pid}/net/ip_tables_names r,
|
||||||
|
|
||||||
/dev/tty rw,
|
profile sysctl flags=(attach_disconnected) {
|
||||||
|
include <abstractions/base>
|
||||||
|
|
||||||
# Force the use as root
|
@{bin}/sysctl mr,
|
||||||
deny @{bin}/sudo x,
|
|
||||||
|
@{PROC}/sys/net/ipv4/conf/all/src_valid_mark w,
|
||||||
|
|
||||||
|
include if exists <local/wg-quick_sysctl>
|
||||||
|
}
|
||||||
|
|
||||||
include if exists <local/wg-quick>
|
include if exists <local/wg-quick>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ include <tunables/global>
|
||||||
@{lib_dirs} = @{lib}/ /snap/{snapd,core}/@{int}@{lib}
|
@{lib_dirs} = @{lib}/ /snap/{snapd,core}/@{int}@{lib}
|
||||||
|
|
||||||
@{exec_path} = @{bin_dirs}/snap
|
@{exec_path} = @{bin_dirs}/snap
|
||||||
profile snap @{exec_path} {
|
profile snap @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
include <abstractions/bus-session>
|
include <abstractions/bus-session>
|
||||||
include <abstractions/bus-system>
|
include <abstractions/bus-system>
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,6 @@ profile hostnamectl @{exec_path} {
|
||||||
|
|
||||||
capability net_admin,
|
capability net_admin,
|
||||||
|
|
||||||
unix bind type=stream addr=@@{udbus}/bus/hostnamectl/system,
|
|
||||||
|
|
||||||
#aa:dbus talk bus=system name=org.freedesktop.hostname1 label=systemd-hostnamed
|
#aa:dbus talk bus=system name=org.freedesktop.hostname1 label=systemd-hostnamed
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,9 @@ profile systemd-modules-load @{exec_path} flags=(attach_disconnected) {
|
||||||
/etc/modules-load.d/ r,
|
/etc/modules-load.d/ r,
|
||||||
/etc/modules-load.d/*.conf r,
|
/etc/modules-load.d/*.conf r,
|
||||||
|
|
||||||
|
@{run}/modprobe.d/ r,
|
||||||
|
@{run}/modprobe.d/*.conf r,
|
||||||
|
|
||||||
@{sys}/devices/@{pci}/config r,
|
@{sys}/devices/@{pci}/config r,
|
||||||
@{sys}/module/*/initstate r,
|
@{sys}/module/*/initstate r,
|
||||||
@{sys}/module/compression r,
|
@{sys}/module/compression r,
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ profile systemd-remount-fs @{exec_path} flags=(attach_disconnected) {
|
||||||
|
|
||||||
@{bin}/mount rix,
|
@{bin}/mount rix,
|
||||||
|
|
||||||
|
/etc/blkid.conf r,
|
||||||
/etc/fstab r,
|
/etc/fstab r,
|
||||||
|
|
||||||
@{run}/host/container-manager r,
|
@{run}/host/container-manager r,
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@ profile systemd-udevd @{exec_path} flags=(attach_disconnected,complain) {
|
||||||
@{bin}/systemctl rCx -> systemctl,
|
@{bin}/systemctl rCx -> systemctl,
|
||||||
@{bin}/systemd-run rix,
|
@{bin}/systemd-run rix,
|
||||||
@{bin}/unshare rix,
|
@{bin}/unshare rix,
|
||||||
|
@{bin}/vmmouse_detect rPUx,
|
||||||
|
|
||||||
@{lib}/crda/* rPUx,
|
@{lib}/crda/* rPUx,
|
||||||
@{lib}/gdm-runtime-config rPx,
|
@{lib}/gdm-runtime-config rPx,
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ abi <abi/4.0>,
|
||||||
include <tunables/global>
|
include <tunables/global>
|
||||||
|
|
||||||
@{exec_path} = @{bin}/df
|
@{exec_path} = @{bin}/df
|
||||||
profile df @{exec_path} {
|
profile df @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
include <abstractions/consoles>
|
include <abstractions/consoles>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,12 +26,12 @@ profile cockpit-bridge @{exec_path} {
|
||||||
|
|
||||||
ptrace read,
|
ptrace read,
|
||||||
|
|
||||||
signal send set=term peer=cockpit-bridge//sudo,
|
|
||||||
signal send set=term peer=cockpit-pcp,
|
signal send set=term peer=cockpit-pcp,
|
||||||
signal send set=term peer=dbus-daemon,
|
signal send set=term peer=dbus-daemon,
|
||||||
signal send set=term peer=journalctl,
|
signal send set=term peer=journalctl,
|
||||||
signal send set=term peer=ssh-agent,
|
signal send set=term peer=ssh-agent,
|
||||||
signal send set=term peer=unconfined,
|
signal send set=term peer=unconfined,
|
||||||
|
signal (send receive) set=term peer=cockpit-bridge//sudo,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,9 @@ profile atd @{exec_path} {
|
||||||
capability setuid,
|
capability setuid,
|
||||||
capability sys_resource,
|
capability sys_resource,
|
||||||
|
|
||||||
signal (receive) set=hup peer=at,
|
signal receive set=hup peer=at,
|
||||||
|
|
||||||
ptrace (read) peer=unconfined,
|
ptrace read peer=unconfined,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ abi <abi/4.0>,
|
||||||
include <tunables/global>
|
include <tunables/global>
|
||||||
|
|
||||||
@{exec_path} = @{bin}/{hostname,domainname,ypdomainname,nisdomainname,nisdomainname}
|
@{exec_path} = @{bin}/{hostname,domainname,ypdomainname,nisdomainname,nisdomainname}
|
||||||
profile hostname @{exec_path} {
|
profile hostname @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
include <abstractions/consoles>
|
include <abstractions/consoles>
|
||||||
include <abstractions/nameservice-strict>
|
include <abstractions/nameservice-strict>
|
||||||
|
|
@ -22,6 +22,8 @@ profile hostname @{exec_path} {
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
|
owner /dev/tty@{int} rw,
|
||||||
|
|
||||||
deny owner @{user_share_dirs}/gvfs-metadata/{,*} r,
|
deny owner @{user_share_dirs}/gvfs-metadata/{,*} r,
|
||||||
|
|
||||||
include if exists <local/hostname>
|
include if exists <local/hostname>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ abi <abi/4.0>,
|
||||||
include <tunables/global>
|
include <tunables/global>
|
||||||
|
|
||||||
@{exec_path} = @{lib}/needrestart/apt-pinvoke
|
@{exec_path} = @{lib}/needrestart/apt-pinvoke
|
||||||
profile needrestart-apt-pinvoke @{exec_path} {
|
profile needrestart-apt-pinvoke @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
include <abstractions/bus-system>
|
include <abstractions/bus-system>
|
||||||
include <abstractions/bus/org.freedesktop.login1>
|
include <abstractions/bus/org.freedesktop.login1>
|
||||||
|
|
@ -24,6 +24,8 @@ profile needrestart-apt-pinvoke @{exec_path} {
|
||||||
|
|
||||||
@{run}/needrestart/{,**} rw,
|
@{run}/needrestart/{,**} rw,
|
||||||
|
|
||||||
|
/var/log/unattended-upgrades/unattended-upgrades-dpkg.log rw,
|
||||||
|
|
||||||
include if exists <local/needrestart-apt-pinvoke>
|
include if exists <local/needrestart-apt-pinvoke>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,13 @@ profile os-prober @{exec_path} flags=(attach_disconnected) {
|
||||||
capability dac_read_search,
|
capability dac_read_search,
|
||||||
capability sys_admin,
|
capability sys_admin,
|
||||||
|
|
||||||
|
mount options=(rprivate, rw) -> /,
|
||||||
|
mount options=(rw, nosuid, nodev) -> /var/lib/os-prober/mount/,
|
||||||
|
|
||||||
umount /var/lib/os-prober/mount/,
|
umount /var/lib/os-prober/mount/,
|
||||||
|
|
||||||
|
mqueue (read getattr) type=posix /,
|
||||||
|
|
||||||
@{exec_path} mrix,
|
@{exec_path} mrix,
|
||||||
|
|
||||||
@{sh_path} rix,
|
@{sh_path} rix,
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@ profile packagekitd @{exec_path} flags=(attach_disconnected) {
|
||||||
@{bin}/fc-cache rPx,
|
@{bin}/fc-cache rPx,
|
||||||
@{bin}/glib-compile-schemas rPx,
|
@{bin}/glib-compile-schemas rPx,
|
||||||
@{bin}/install-info rPx,
|
@{bin}/install-info rPx,
|
||||||
|
@{bin}/rpm rPUx, #aa:only opensuse
|
||||||
@{bin}/rpmdb2solv rPUx, #aa:only opensuse
|
@{bin}/rpmdb2solv rPUx, #aa:only opensuse
|
||||||
@{bin}/systemd-inhibit rPx,
|
@{bin}/systemd-inhibit rPx,
|
||||||
@{bin}/update-desktop-database rPx,
|
@{bin}/update-desktop-database rPx,
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ profile remmina @{exec_path} {
|
||||||
include <abstractions/ibus>
|
include <abstractions/ibus>
|
||||||
include <abstractions/nameservice-strict>
|
include <abstractions/nameservice-strict>
|
||||||
include <abstractions/ssl_certs>
|
include <abstractions/ssl_certs>
|
||||||
|
include <abstractions/thumbnails-cache-read>
|
||||||
include <abstractions/user-download-strict>
|
include <abstractions/user-download-strict>
|
||||||
|
|
||||||
network inet stream,
|
network inet stream,
|
||||||
|
|
@ -35,16 +36,20 @@ profile remmina @{exec_path} {
|
||||||
#aa:dbus talk bus=session name=org.ayatana.NotificationItem label=gnome-shell
|
#aa:dbus talk bus=session name=org.ayatana.NotificationItem label=gnome-shell
|
||||||
#aa:dbus talk bus=session name=org.gtk.vfs label="gvfsd{,-*}"
|
#aa:dbus talk bus=session name=org.gtk.vfs label="gvfsd{,-*}"
|
||||||
|
|
||||||
@{exec_path} r,
|
@{exec_path} rm,
|
||||||
|
|
||||||
|
@{open_path} rPx -> child-open-browsers,
|
||||||
|
|
||||||
/usr/share/remmina/{,**} r,
|
/usr/share/remmina/{,**} r,
|
||||||
/usr/share/themes/{,**} r,
|
/usr/share/themes/{,**} r,
|
||||||
|
|
||||||
/etc/timezone r,
|
/etc/fstab r,
|
||||||
/etc/ssh/ssh_config r,
|
/etc/ssh/ssh_config r,
|
||||||
/etc/ssh/ssh_config.d/{,*} r,
|
/etc/ssh/ssh_config.d/{,*} r,
|
||||||
|
/etc/timezone r,
|
||||||
|
|
||||||
owner @{HOME}/@{XDG_SSH_DIR}/{,*} r,
|
owner @{HOME}/@{XDG_SSH_DIR}/config r,
|
||||||
|
owner @{HOME}/@{XDG_SSH_DIR}/known_hosts r,
|
||||||
|
|
||||||
owner @{user_cache_dirs}/org.remmina.Remmina/{,**} rw,
|
owner @{user_cache_dirs}/org.remmina.Remmina/{,**} rw,
|
||||||
owner @{user_cache_dirs}/remmina/{,**} rw,
|
owner @{user_cache_dirs}/remmina/{,**} rw,
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ profile signal-desktop @{exec_path} {
|
||||||
include <abstractions/bus/org.freedesktop.ScreenSaver>
|
include <abstractions/bus/org.freedesktop.ScreenSaver>
|
||||||
include <abstractions/bus/org.kde.StatusNotifierWatcher>
|
include <abstractions/bus/org.kde.StatusNotifierWatcher>
|
||||||
include <abstractions/common/electron>
|
include <abstractions/common/electron>
|
||||||
|
include <abstractions/devices-usb-read>
|
||||||
include <abstractions/fontconfig-cache-read>
|
include <abstractions/fontconfig-cache-read>
|
||||||
include <abstractions/user-download-strict>
|
include <abstractions/user-download-strict>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,8 @@ profile ss @{exec_path} {
|
||||||
|
|
||||||
/etc/iproute2/{,**} r,
|
/etc/iproute2/{,**} r,
|
||||||
|
|
||||||
owner @{tmp}/*.ss rw,
|
owner @{tmp}/*.ss rw,
|
||||||
owner @{HOME}/*.ss rw,
|
owner @{HOME}/*.ss rw,
|
||||||
|
|
||||||
@{sys}/fs/cgroup/{,**/} r,
|
@{sys}/fs/cgroup/{,**/} r,
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue