Merge branch 'main' into tunables

This commit is contained in:
nobody43 2023-08-06 20:50:10 +00:00 committed by GitHub
commit da1232724c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 133 additions and 20 deletions

View file

@ -0,0 +1,6 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
owner /dev/shm/sway* rw,
owner /dev/shm/dunst-?????? rw,

View file

@ -130,6 +130,7 @@ profile firefox @{exec_path} flags=(attach_disconnected) {
@{bin}/{,ba,da}sh rix, @{bin}/{,ba,da}sh rix,
@{bin}/basename rix, @{bin}/basename rix,
@{bin}/expr rix,
@{firefox_lib_dirs}/{,**} r, @{firefox_lib_dirs}/{,**} r,
@{firefox_lib_dirs}/*.so mr, @{firefox_lib_dirs}/*.so mr,
@ -213,13 +214,16 @@ profile firefox @{exec_path} flags=(attach_disconnected) {
/tmp/ r, /tmp/ r,
/var/tmp/ r, /var/tmp/ r,
owner /tmp/@{firefox_name}/ rw,
owner /tmp/@{firefox_name}/* rwk,
owner /tmp/* rw, owner /tmp/* rw,
owner /tmp/firefox_*/ rw, owner /tmp/firefox_*/ rw,
owner /tmp/firefox_*/* rwk, owner /tmp/firefox_*/* rwk,
owner /tmp/@{firefox_name}/ rw,
owner /tmp/@{firefox_name}/* rwk,
owner /tmp/mozilla_*/ rw, owner /tmp/mozilla_*/ rw,
owner /tmp/mozilla_*/* rw, owner /tmp/mozilla_*/* rw,
owner /tmp/MozillaBackgroundTask-*-removeDirectory/ rw,
owner /tmp/MozillaBackgroundTask-*-removeDirectory/** rwk,
owner /tmp/Mozillato-be-removed-cachePurge-* k,
owner /tmp/Temp-*/ rw, owner /tmp/Temp-*/ rw,
@{run}/mount/utab r, @{run}/mount/utab r,
@ -241,6 +245,8 @@ profile firefox @{exec_path} flags=(attach_disconnected) {
@{sys}/devices/system/cpu/present r, @{sys}/devices/system/cpu/present r,
@{sys}/fs/cgroup/cpu,cpuacct/cpu.cfs_quota_us r, @{sys}/fs/cgroup/cpu,cpuacct/cpu.cfs_quota_us r,
owner @{sys}/fs/cgroup/user.slice/user-@{uid}.slice/user@@{uid}.service/background.slice/*/cpu.max r,
@{PROC}/@{pid}/net/arp r, @{PROC}/@{pid}/net/arp r,
@{PROC}/@{pid}/net/if_inet6 r, @{PROC}/@{pid}/net/if_inet6 r,
@{PROC}/@{pid}/net/route r, @{PROC}/@{pid}/net/route r,

View file

@ -41,8 +41,11 @@ profile firefox-crashreporter @{exec_path} flags=(attach_disconnected) {
owner "@{firefox_config_dirs}/firefox/Crash Reports/{,**}" rw, owner "@{firefox_config_dirs}/firefox/Crash Reports/{,**}" rw,
owner @{firefox_config_dirs}/*.*/crashes/{,**} rw, owner @{firefox_config_dirs}/*.*/crashes/{,**} rw,
owner @{firefox_config_dirs}/*.*/crashes/events/@{uuid} rw,
owner @{firefox_config_dirs}/*.*/extensions/*.xpi r, owner @{firefox_config_dirs}/*.*/extensions/*.xpi r,
owner @{firefox_config_dirs}/*.*/minidumps/{,**} rw, owner @{firefox_config_dirs}/*.*/minidumps/{,**} rw,
owner @{firefox_config_dirs}/*.*/minidumps//@{uuid}.{dmp,extra} r,
owner @{firefox_config_dirs}/*.*/storage/default/* r,
owner @{firefox_cache_dirs}/firefox/*.*/** r, owner @{firefox_cache_dirs}/firefox/*.*/** r,

View file

@ -30,6 +30,7 @@ profile firefox-minidump-analyzer @{exec_path} {
owner @{firefox_config_dirs}/*.*/extensions/*.xpi r, owner @{firefox_config_dirs}/*.*/extensions/*.xpi r,
owner @{firefox_config_dirs}/*.*/minidumps/ rw, owner @{firefox_config_dirs}/*.*/minidumps/ rw,
owner @{firefox_config_dirs}/*.*/minidumps/@{uuid}.{dmp,extra} rw, owner @{firefox_config_dirs}/*.*/minidumps/@{uuid}.{dmp,extra} rw,
owner @{firefox_config_dirs}/*.*/storage/default/* r,
owner @{firefox_cache_dirs}/firefox/*.*/startupCache/*Cache* r, owner @{firefox_cache_dirs}/firefox/*.*/startupCache/*Cache* r,

View file

@ -23,9 +23,13 @@ profile iio-sensor-proxy @{exec_path} {
@{sys}/bus/ r, @{sys}/bus/ r,
@{sys}/bus/iio/devices/ r, @{sys}/bus/iio/devices/ r,
@{sys}/bus/platform/devices/ r,
@{sys}/class/ r, @{sys}/class/ r,
@{sys}/class/input/ r,
@{sys}/devices/**/uevent r, @{sys}/devices/**/uevent r,
@{sys}/devices/pci[0-9]*/**/ r,
@{sys}/devices/pci[0-9]*/**/iio:*/** rw, @{sys}/devices/pci[0-9]*/**/iio:*/** rw,
@{sys}/devices/pci[0-9]*/**/name r,
/dev/iio:* r, /dev/iio:* r,

View file

@ -80,6 +80,8 @@ profile pipewire @{exec_path} flags=(attach_disconnected) {
@{sys}/devices/pci[0-9]*/**/usb[0-9]/**/{idVendor,idProduct,removable,uevent} r, @{sys}/devices/pci[0-9]*/**/usb[0-9]/**/{idVendor,idProduct,removable,uevent} r,
@{sys}/devices/virtual/dmi/id/{sys_vendor,product_version,product_name,bios_vendor} r, @{sys}/devices/virtual/dmi/id/{sys_vendor,product_version,product_name,bios_vendor} r,
owner @{PROC}/@{pid}/task/@{tid}/comm rw,
/dev/media[0-9]* rw, /dev/media[0-9]* rw,
include if exists <local/pipewire> include if exists <local/pipewire>

View file

@ -173,8 +173,12 @@ profile pulseaudio @{exec_path} {
@{run}/systemd/users/@{uid} r, @{run}/systemd/users/@{uid} r,
@{run}/udev/data/+pci* r,
@{run}/udev/data/+sound:card[0-9]* r, # For sound @{run}/udev/data/+sound:card[0-9]* r, # For sound
@{run}/udev/data/c116:[0-9]* r, # for ALSA @{run}/udev/data/c116:[0-9]* r, # for ALSA
@{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,
@{sys}/class/sound/ r, @{sys}/class/sound/ r,
@{sys}/devices/**/sound/**/{uevent,pcm_class} r, @{sys}/devices/**/sound/**/{uevent,pcm_class} r,

View file

@ -9,6 +9,7 @@ include <tunables/global>
@{exec_path} = @{bin}/update-mime-database @{exec_path} = @{bin}/update-mime-database
profile update-mime-database @{exec_path} { profile update-mime-database @{exec_path} {
include <abstractions/base> include <abstractions/base>
include <abstractions/consoles>
include <abstractions/nameservice-strict> include <abstractions/nameservice-strict>
capability dac_override, capability dac_override,

View file

@ -54,9 +54,10 @@ profile upowerd @{exec_path} flags=(attach_disconnected) {
@{run}/udev/data/+pci* r, @{run}/udev/data/+pci* r,
@{run}/udev/data/+platform* r, @{run}/udev/data/+platform* r,
@{run}/udev/data/+power_supply* r, @{run}/udev/data/+power_supply* r,
@{run}/udev/data/+sound:card[0-9]* r, # For sound @{run}/udev/data/+sound:card[0-9]* r, # for sound
@{run}/udev/data/c116:[0-9]* r, # for ALSA @{run}/udev/data/c10:[0-9]* r, # for non-serial mice, misc features
@{run}/udev/data/c13:[0-9]* r, # for /dev/input/* @{run}/udev/data/c13:[0-9]* r, # for /dev/input/*
@{run}/udev/data/c116:[0-9]* r, # for ALSA
@{run}/systemd/inhibit/[0-9]*.ref rw, @{run}/systemd/inhibit/[0-9]*.ref rw,

View file

@ -30,6 +30,7 @@ profile xdg-settings @{exec_path} {
@{bin}/dbus-launch rCx -> dbus, @{bin}/dbus-launch rCx -> dbus,
@{bin}/dbus-send rCx -> dbus, @{bin}/dbus-send rCx -> dbus,
@{bin}/kreadconfig5 rPx,
@{bin}/xdg-mime rPx, @{bin}/xdg-mime rPx,
@{bin}/xprop rPx, @{bin}/xprop rPx,

View file

@ -40,6 +40,7 @@ profile xrdb @{exec_path} {
owner /tmp/xauth-[0-9]*-_[0-9] r, owner /tmp/xauth-[0-9]*-_[0-9] r,
@{run}/sddm/\{@{uuid}\} r, @{run}/sddm/\{@{uuid}\} r,
@{run}/sddm/xauth_?????? r,
# file_inherit # file_inherit
owner /dev/tty[0-9]* rw, owner /dev/tty[0-9]* rw,

View file

@ -16,6 +16,7 @@ profile xset @{exec_path} {
owner @{HOME}/.Xauthority r, owner @{HOME}/.Xauthority r,
@{run}/sddm/\{@{uuid}\} r, @{run}/sddm/\{@{uuid}\} r,
@{run}/sddm/xauth_?????? r,
# file_inherit # file_inherit
owner /dev/tty[0-9]* rw, owner /dev/tty[0-9]* rw,

View file

@ -81,6 +81,7 @@ profile gnome-control-center @{exec_path} flags=(attach_disconnected) {
@{bin}/software-properties-gtk rPx, @{bin}/software-properties-gtk rPx,
@{bin}/usermod rPx, @{bin}/usermod rPx,
@{lib}/@{multiarch}/webkit2gtk-{3,4}.0/WebKitNetworkProcess rix, @{lib}/@{multiarch}/webkit2gtk-{3,4}.0/WebKitNetworkProcess rix,
@{lib}/cups/backend/snmp rPx,
@{lib}/gnome-control-center-goa-helper rPx, @{lib}/gnome-control-center-goa-helper rPx,
@{lib}/gnome-control-center-print-renderer rPx, @{lib}/gnome-control-center-print-renderer rPx,
@{lib}/webkit2gtk-{3,4}.0/WebKitNetworkProcess rix, @{lib}/webkit2gtk-{3,4}.0/WebKitNetworkProcess rix,

View file

@ -84,6 +84,7 @@ profile gsd-print-notifications @{exec_path} flags=(attach_disconnected) {
@{run}/cups/cups.sock rw, @{run}/cups/cups.sock rw,
owner @{PROC}/@{pid}/cgroup r,
owner @{PROC}/@{pid}/fd/ r, owner @{PROC}/@{pid}/fd/ r,
owner /dev/tty[0-9]* rw, owner /dev/tty[0-9]* rw,

View file

@ -109,6 +109,10 @@ profile tracker-extract @{exec_path} flags=(attach_disconnected) {
@{run}/udev/data/c23[4-9]:[0-9]* r, # For dynamic assignment range 234 to 254 @{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/c24[0-9]:[0-9]* r,
@{run}/udev/data/c25[0-4]:[0-9]* r, @{run}/udev/data/c25[0-4]:[0-9]* r,
@{run}/udev/data/c3[0-9]*:[0-9]* r, # For dynamic assignment range 384 to 511
@{run}/udev/data/c4[0-9]*:[0-9]* r,
@{run}/udev/data/c5[0-9]*:[0-9]* r,
@{run}/mount/utab r, @{run}/mount/utab r,
owner @{PROC}/@{pid}/fd/ r, owner @{PROC}/@{pid}/fd/ r,

View file

@ -9,6 +9,8 @@ include <tunables/global>
@{exec_path} = @{lib}/kactivitymanagerd @{exec_path} = @{lib}/kactivitymanagerd
profile kactivitymanagerd @{exec_path} { profile kactivitymanagerd @{exec_path} {
include <abstractions/base> include <abstractions/base>
include <abstractions/freedesktop.org>
include <abstractions/nameservice-strict>
include <abstractions/qt5> include <abstractions/qt5>
include <abstractions/X-strict> include <abstractions/X-strict>
@ -26,6 +28,7 @@ profile kactivitymanagerd @{exec_path} {
owner @{user_config_dirs}/kactivitymanagerdrc.lock rwk, owner @{user_config_dirs}/kactivitymanagerdrc.lock rwk,
owner @{user_share_dirs}/kactivitymanagerd/{,**} rwlk, owner @{user_share_dirs}/kactivitymanagerd/{,**} rwlk,
owner @{user_share_dirs}/RecentDocuments/*.desktop w,
@{PROC}/sys/kernel/core_pattern r, @{PROC}/sys/kernel/core_pattern r,
@{PROC}/sys/kernel/random/boot_id r, @{PROC}/sys/kernel/random/boot_id r,

View file

@ -11,6 +11,7 @@ profile kalendarac @{exec_path} {
include <abstractions/base> include <abstractions/base>
include <abstractions/dri-common> include <abstractions/dri-common>
include <abstractions/dri-enumerate> include <abstractions/dri-enumerate>
include <abstractions/fonts>
include <abstractions/freedesktop.org> include <abstractions/freedesktop.org>
include <abstractions/mesa> include <abstractions/mesa>
include <abstractions/nameservice-strict> include <abstractions/nameservice-strict>

View file

@ -16,6 +16,7 @@ profile kcminit @{exec_path} {
@{exec_path} mr, @{exec_path} mr,
@{bin}/xrdb rPx, @{bin}/xrdb rPx,
@{bin}/xsetroot rPx,
/usr/share/icu/[0-9]*.[0-9]*/*.dat r, /usr/share/icu/[0-9]*.[0-9]*/*.dat r,
/usr/share/hwdata/pnp.ids r, /usr/share/hwdata/pnp.ids r,

View file

@ -13,6 +13,7 @@ profile kded5 @{exec_path} {
include <abstractions/consoles> include <abstractions/consoles>
include <abstractions/dconf-write> include <abstractions/dconf-write>
include <abstractions/dri-common> include <abstractions/dri-common>
include <abstractions/dri-enumerate>
include <abstractions/fonts> include <abstractions/fonts>
include <abstractions/freedesktop.org> include <abstractions/freedesktop.org>
include <abstractions/gtk> include <abstractions/gtk>
@ -38,22 +39,23 @@ profile kded5 @{exec_path} {
@{exec_path} mr, @{exec_path} mr,
@{lib}/kf5/kconf_update rPx,
@{lib}/utempter/utempter rPx,
@{bin}/kcminit rPx, @{bin}/kcminit rPx,
@{bin}/pgrep rCx -> pgrep, @{bin}/pgrep rCx -> pgrep,
@{bin}/setxkbmap rix, @{bin}/setxkbmap rix,
@{bin}/xsettingsd rPx, @{bin}/xsettingsd rPx,
@{lib}/kf5/kconf_update rPx,
@{lib}/utempter/utempter rPx,
/usr/share/hwdata/*.ids r, /usr/share/hwdata/*.ids r,
/usr/share/icu/[0-9]*.[0-9]*/*.dat r, /usr/share/icu/[0-9]*.[0-9]*/*.dat r,
/usr/share/kconf_update/ r,
/usr/share/kded5/{,**} r, /usr/share/kded5/{,**} r,
/usr/share/kf5/kcookiejar/* r,
/usr/share/khotkeys/{,**} r, /usr/share/khotkeys/{,**} r,
/usr/share/knotifications5/{,**} r, /usr/share/knotifications5/{,**} r,
/usr/share/kservices5/{,**} r, /usr/share/kservices5/{,**} r,
/usr/share/kservicetypes5/{,**} r, /usr/share/kservicetypes5/{,**} r,
/usr/share/mime/ r, /usr/share/mime/ r,
/usr/share/kconf_update/ r,
/etc/fstab r, /etc/fstab r,
/etc/machine-id r, /etc/machine-id r,
@ -74,28 +76,39 @@ profile kded5 @{exec_path} {
owner @{user_config_dirs}/gtk-{3,4}.0/{,**} rwl, owner @{user_config_dirs}/gtk-{3,4}.0/{,**} rwl,
owner @{user_config_dirs}/kcminputrc r, owner @{user_config_dirs}/kcminputrc r,
owner @{user_config_dirs}/kconf_updaterc r, owner @{user_config_dirs}/kconf_updaterc r,
owner @{user_config_dirs}/kded5rc* rwl, owner @{user_config_dirs}/kcookiejarrc r,
owner @{user_config_dirs}/kdebugrc r,
owner @{user_config_dirs}/kded5rc.lock rwk, owner @{user_config_dirs}/kded5rc.lock rwk,
owner @{user_config_dirs}/kded5rc* rwl,
owner @{user_config_dirs}/kdedefaults/{,**} r, owner @{user_config_dirs}/kdedefaults/{,**} r,
owner @{user_config_dirs}/kdeglobals r, owner @{user_config_dirs}/kdeglobals r,
owner @{user_config_dirs}/khotkeysrc.lock rwk, owner @{user_config_dirs}/khotkeysrc.lock rwk,
owner @{user_config_dirs}/khotkeysrc* rwl, owner @{user_config_dirs}/khotkeysrc* rwl,
owner @{user_config_dirs}/kioslaverc r,
owner @{user_config_dirs}/ktimezonedrc r, owner @{user_config_dirs}/ktimezonedrc r,
owner @{user_config_dirs}/kwinrc* rwl,
owner @{user_config_dirs}/kwinrc.lock rwk, owner @{user_config_dirs}/kwinrc.lock rwk,
owner @{user_config_dirs}/kwinrc* rwl,
owner @{user_config_dirs}/kxkbrc r, owner @{user_config_dirs}/kxkbrc r,
owner @{user_config_dirs}/libaccounts-glib/ rw, owner @{user_config_dirs}/libaccounts-glib/ rw,
owner @{user_config_dirs}/libaccounts-glib/accounts.db{,-shm,-wal,-journal} rwk, owner @{user_config_dirs}/libaccounts-glib/accounts.db{,-shm,-wal,-journal} rwk,
owner @{user_config_dirs}/menus/ r,
owner @{user_config_dirs}/menus/applications-merged/ r,
owner @{user_config_dirs}/plasma-nm r,
owner @{user_config_dirs}/touchpadrc r,
owner @{user_config_dirs}/xsettingsd/{,**} rw, owner @{user_config_dirs}/xsettingsd/{,**} rw,
owner @{user_share_dirs}/icc/{,edid-*} r, owner @{user_share_dirs}/icc/{,edid-*} r,
owner @{user_share_dirs}/kded5/{,**} r, owner @{user_share_dirs}/kcookiejar/#*[0-9] rw,
owner @{user_share_dirs}/kscreen/{,**} rw, owner @{user_share_dirs}/kcookiejar/cookies rw,
owner @{user_share_dirs}/kcookiejar/cookies.?????? rwlk,
owner @{user_share_dirs}/kded5/{,**} rw,
owner @{user_share_dirs}/kscreen/{,**} rwl,
owner @{user_share_dirs}/ktp/cache.db rwk, owner @{user_share_dirs}/ktp/cache.db rwk,
owner @{user_share_dirs}/kcookiejar/#@{hex}* rw, owner @{user_share_dirs}/remoteview/ r,
owner @{user_share_dirs}/kcookiejar/cookies.* rwkl, owner @{user_share_dirs}/services5/{,**} r,
owner @{run}/user/@{uid}/#@{int} rw, owner @{run}/user/@{uid}/#@{int} rw,
owner @{run}/user/@{uid}/gvfs/ r,
owner @{run}/user/@{uid}/kded5*kioworker.socket rwl, owner @{run}/user/@{uid}/kded5*kioworker.socket rwl,
owner /tmp/plasma-csd-generator.@{rand6}/{,**} rw, owner /tmp/plasma-csd-generator.@{rand6}/{,**} rw,

View file

@ -16,6 +16,7 @@ profile kioslave5 @{exec_path} {
include <abstractions/nameservice-strict> include <abstractions/nameservice-strict>
include <abstractions/openssl> include <abstractions/openssl>
include <abstractions/qt5> include <abstractions/qt5>
include <abstractions/ssl_certs>
include <abstractions/trash> include <abstractions/trash>
network inet dgram, network inet dgram,
@ -23,7 +24,9 @@ profile kioslave5 @{exec_path} {
network inet stream, network inet stream,
network inet6 stream, network inet6 stream,
network netlink raw, network netlink raw,
network netlink dgram,
signal (receive) set=term peer=firefox-kmozillahelper,
signal (receive) set=term peer=plasmashell, signal (receive) set=term peer=plasmashell,
@{exec_path} mr, @{exec_path} mr,

View file

@ -96,6 +96,7 @@ profile kscreenlocker-greet @{exec_path} {
@{sys}/devices/system/node/node[0-9]*/meminfo r, @{sys}/devices/system/node/node[0-9]*/meminfo r,
@{PROC}/@{pid}/cmdline r, @{PROC}/@{pid}/cmdline r,
@{PROC}/@{pid}/loginuid r,
@{PROC}/@{pid}/mounts r, @{PROC}/@{pid}/mounts r,
@{PROC}/sys/kernel/core_pattern r, @{PROC}/sys/kernel/core_pattern r,
owner @{PROC}/@{pid}/loginuid r, owner @{PROC}/@{pid}/loginuid r,

View file

@ -145,10 +145,10 @@ profile plasmashell @{exec_path} flags=(mediate_deleted) {
owner @{user_share_dirs}/plasma/plasmoids/{,**} r, owner @{user_share_dirs}/plasma/plasmoids/{,**} r,
owner @{user_share_dirs}/user-places.xbel r, owner @{user_share_dirs}/user-places.xbel r,
@{run}/user/@{uid}/gvfs/ r,
owner @{run}/user/@{uid}/#@{int} rw, owner @{run}/user/@{uid}/#@{int} rw,
owner @{run}/user/@{uid}/kdesud_:1 w, owner @{run}/user/@{uid}/kdesud_:1 w,
owner @{run}/user/@{uid}/plasmashell@{rand6}.[0-9].kioworker.socket rwl, owner @{run}/user/@{uid}/plasmashell@{rand6}.[0-9].kioworker.socket rwl,
owner @{run}/user/@{uid}/gvfs/ r,
owner @{run}/user/@{uid}/pulse/ rw, owner @{run}/user/@{uid}/pulse/ rw,
@{sys}/bus/ r, @{sys}/bus/ r,

View file

@ -65,7 +65,7 @@ profile sddm @{exec_path} flags=(attach_disconnected,mediate_deleted) {
@{bin}/dbus-update-activation-environment rCx -> dbus, @{bin}/dbus-update-activation-environment rCx -> dbus,
@{bin}/gnome-keyring-daemon rPx, @{bin}/gnome-keyring-daemon rPx,
@{bin}/kwalletd5 rPx, @{bin}/kwalletd5 rPx,
@{bin}/startplasma-wayland rPx, @{bin}/startplasma-wayland rPUx,
@{bin}/startplasma-x11 rPx, @{bin}/startplasma-x11 rPx,
@{bin}/systemctl rPx -> child-systemctl, @{bin}/systemctl rPx -> child-systemctl,
@{bin}/xrdb rPx, @{bin}/xrdb rPx,

View file

@ -9,6 +9,7 @@ include <tunables/global>
@{exec_path} = @{bin}/xembedsniproxy @{exec_path} = @{bin}/xembedsniproxy
profile xembedsniproxy @{exec_path} { profile xembedsniproxy @{exec_path} {
include <abstractions/base> include <abstractions/base>
include <abstractions/fonts>
include <abstractions/nameservice-strict> include <abstractions/nameservice-strict>
include <abstractions/qt5> include <abstractions/qt5>

View file

@ -76,6 +76,9 @@ profile tailscaled @{exec_path} flags=(attach_disconnected) {
@{bin}/systemctl mr, @{bin}/systemctl mr,
@{PROC}/ r,
@{PROC}/@{pid}/fd/ r,
/dev/net/tun rw, /dev/net/tun rw,
} }

View file

@ -28,6 +28,7 @@ profile systemd-backlight @{exec_path} {
@{sys}/class/backlight/ r, @{sys}/class/backlight/ r,
@{sys}/devices/pci[0-9]*/*:[0-9]*.[0-9]*/**/ r, @{sys}/devices/pci[0-9]*/*:[0-9]*.[0-9]*/**/ r,
@{sys}/devices/pci[0-9]*/**/ r,
@{sys}/devices/pci[0-9]*/**/backlight/**/{max_brightness,actual_brightness} r, @{sys}/devices/pci[0-9]*/**/backlight/**/{max_brightness,actual_brightness} r,
@{sys}/devices/pci[0-9]*/**/backlight/**/{uevent,type} r, @{sys}/devices/pci[0-9]*/**/backlight/**/{uevent,type} r,
@{sys}/devices/pci[0-9]*/**/backlight/**/brightness rw, @{sys}/devices/pci[0-9]*/**/backlight/**/brightness rw,

View file

@ -9,6 +9,7 @@ include <tunables/global>
@{exec_path} = @{bin}/systemd-sysusers @{exec_path} = @{bin}/systemd-sysusers
profile systemd-sysusers @{exec_path} flags=(attach_disconnected) { profile systemd-sysusers @{exec_path} flags=(attach_disconnected) {
include <abstractions/base> include <abstractions/base>
include <abstractions/consoles>
include <abstractions/systemd-common> include <abstractions/systemd-common>
capability chown, capability chown,

View file

@ -16,6 +16,7 @@ profile cockpit-bridge @{exec_path} {
include <abstractions/python> include <abstractions/python>
capability dac_read_search, capability dac_read_search,
capability net_admin,
capability sys_nice, capability sys_nice,
network inet dgram, network inet dgram,
@ -41,8 +42,10 @@ profile cockpit-bridge @{exec_path} {
/usr/share/cockpit/{,**} r, /usr/share/cockpit/{,**} r,
/etc/cockpit/{,**} r, /etc/cockpit/{,**} r,
/etc/httpd/conf/mime.types r,
/etc/login.defs r, /etc/login.defs r,
/etc/machine-id r, /etc/machine-id r,
/etc/mime.types r,
/etc/motd r, /etc/motd r,
/etc/shadow r, /etc/shadow r,
/etc/shells r, /etc/shells r,

View file

@ -204,6 +204,7 @@ profile libvirtd @{exec_path} flags=(attach_disconnected) {
@{sys}/devices/pci[0-9]*/**/mdev_supported_types/*/create w, @{sys}/devices/pci[0-9]*/**/mdev_supported_types/*/create w,
@{sys}/devices/pci[0-9]*/**/net/*/{,**} r, @{sys}/devices/pci[0-9]*/**/net/*/{,**} r,
@{sys}/devices/pci[0-9]*/**/remove w, @{sys}/devices/pci[0-9]*/**/remove w,
@{sys}/devices/pci[0-9]*/**/resource r,
@{sys}/devices/pci[0-9]*/**/sriov_totalvfs 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]*/cache/{,**} r,

View file

@ -13,6 +13,8 @@ profile aa-notify @{exec_path} {
include <abstractions/nameservice-strict> include <abstractions/nameservice-strict>
include <abstractions/python> include <abstractions/python>
capability setgid,
capability setuid,
capability sys_ptrace, capability sys_ptrace,
ptrace (read), ptrace (read),
@ -24,10 +26,14 @@ profile aa-notify @{exec_path} {
/etc/apparmor/*.conf r, /etc/apparmor/*.conf r,
/etc/inputrc r, /etc/inputrc r,
/usr/share/terminfo/x/xterm-256color r, /usr/etc/inputrc.keys r,
/usr/share/terminfo/d/dumb r, /usr/share/terminfo/d/dumb r,
/usr/share/terminfo/x/xterm r,
/usr/share/terminfo/x/xterm-256color r,
/var/log/audit/audit.log r, /var/log/audit/audit.log r,
owner @{HOME}/.inputrc r,
owner @{HOME}/.terminfo/[0-9]*/dumb r, owner @{HOME}/.terminfo/[0-9]*/dumb r,
owner /tmp/[a-z0-9]* rw, owner /tmp/[a-z0-9]* rw,

View file

@ -31,7 +31,9 @@ profile agetty @{exec_path} {
/{etc,run,lib,usr/lib}/issue.d/{,*} r, /{etc,run,lib,usr/lib}/issue.d/{,*} r,
/etc/inittab r, /etc/inittab r,
/etc/login.defs r, /etc/login.defs r,
/etc/login.defs.d/ r,
/etc/os-release r, /etc/os-release r,
/usr/etc/login.defs r,
@{run}/resolvconf/resolv.conf r, @{run}/resolvconf/resolv.conf r,
owner @{run}/agetty.reload rw, owner @{run}/agetty.reload rw,

View file

@ -14,6 +14,7 @@ profile augenrules @{exec_path} {
@{exec_path} mr, @{exec_path} mr,
@{bin}/auditctl rPx, @{bin}/auditctl rPx,
@{bin}/cat rix,
@{bin}/chmod rix, @{bin}/chmod rix,
@{bin}/cmp rix, @{bin}/cmp rix,
@{bin}/cp rix, @{bin}/cp rix,

View file

@ -72,8 +72,9 @@ profile cupsd @{exec_path} flags=(attach_disconnected) {
@{lib}/cups/notifier/* rix, @{lib}/cups/notifier/* rix,
/usr/share/cups/{,**} r, /usr/share/cups/{,**} r,
/usr/share/ppd/{,**} r,
/usr/share/ghostscript/{,**} r, /usr/share/ghostscript/{,**} r,
/usr/share/poppler/{,**} r,
/usr/share/ppd/{,**} r,
/etc/cups/{,**} rw, /etc/cups/{,**} rw,
/etc/foomatic/* r, /etc/foomatic/* r,

View file

@ -121,6 +121,8 @@ profile dkms @{exec_path} flags=(attach_disconnected) {
owner /boot/System.map-* r, owner /boot/System.map-* r,
owner /tmp/tmp.* r,
# Inherit silencer # Inherit silencer
deny /apparmor/.null rw, deny /apparmor/.null rw,

View file

@ -15,6 +15,8 @@ profile findmnt @{exec_path} flags=(attach_disconnected,complain) {
capability dac_read_search, capability dac_read_search,
unix (receive) type=stream,
@{exec_path} mr, @{exec_path} mr,
/etc/fstab r, /etc/fstab r,

View file

@ -14,6 +14,8 @@ profile gssproxy @{exec_path} {
@{exec_path} mr, @{exec_path} mr,
@{lib}/ r,
/etc/gssproxy/{,**} r, /etc/gssproxy/{,**} r,
owner /var/lib/gssproxy/{,**} rw, owner /var/lib/gssproxy/{,**} rw,

View file

@ -42,6 +42,7 @@ profile kmod @{exec_path} flags=(attach_disconnected) {
/usr/src/*/*.ko r, /usr/src/*/*.ko r,
/var/lib/dkms/**/module/*.ko r, /var/lib/dkms/**/module/*.ko r,
/var/lib/dpkg/triggers/* r, /var/lib/dpkg/triggers/* r,
/var/lib/ebtables/lock r,
/var/tmp/dracut.*/{,**} rw, /var/tmp/dracut.*/{,**} rw,
owner /boot/System.map-* r, owner /boot/System.map-* r,
owner /tmp/mkinitcpio.*/{,**} rw, owner /tmp/mkinitcpio.*/{,**} rw,

View file

@ -10,7 +10,16 @@ include <tunables/global>
profile nfsdcld @{exec_path} { profile nfsdcld @{exec_path} {
include <abstractions/base> include <abstractions/base>
capability mknod,
capability setpcap,
@{exec_path} mr, @{exec_path} mr,
/etc/nfs.conf r,
/etc/nfs.conf rk,
/var/lib/nfs/nfsdcld/{,**} rw,
/var/lib/nfs/rpc_pipefs/nfsd/* rw,
include if exists <local/nfsdcld> include if exists <local/nfsdcld>
} }

View file

@ -10,6 +10,7 @@ include <tunables/global>
profile nvtop @{exec_path} flags=(attach_disconnected) { profile nvtop @{exec_path} flags=(attach_disconnected) {
include <abstractions/base> include <abstractions/base>
include <abstractions/consoles> include <abstractions/consoles>
include <abstractions/dri-common>
include <abstractions/dri-enumerate> include <abstractions/dri-enumerate>
include <abstractions/nameservice-strict> include <abstractions/nameservice-strict>
include <abstractions/opencl-nvidia> include <abstractions/opencl-nvidia>
@ -36,8 +37,9 @@ profile nvtop @{exec_path} flags=(attach_disconnected) {
@{sys}/bus/ r, @{sys}/bus/ r,
@{sys}/class/ r, @{sys}/class/ r,
@{sys}/class/drm/ r, @{sys}/class/drm/ r,
@{sys}/devices/pci[0-9]*/**/enable r,
@{sys}/devices/pci[0-9]*/**/drm/card[0-9]*/gt_cur_freq_mhz r, @{sys}/devices/pci[0-9]*/**/drm/card[0-9]*/gt_cur_freq_mhz r,
@{sys}/devices/pci[0-9]*/**/enable r,
@{sys}/devices/system/node/node[0-9]*/cpumap r,
@{PROC}/ r, @{PROC}/ r,
@{PROC}/@{pids}/ r, @{PROC}/@{pids}/ r,

View file

@ -21,6 +21,7 @@ profile os-prober @{exec_path} flags=(attach_disconnected) {
@{bin}/{,ba,da}sh rix, @{bin}/{,ba,da}sh rix,
@{bin}/{e,f,}grep rix, @{bin}/{e,f,}grep rix,
@{bin}/blkid rPx, @{bin}/blkid rPx,
@{bin}/cat rix,
@{bin}/cut rix, @{bin}/cut rix,
@{bin}/dmraid rPUx, @{bin}/dmraid rPUx,
@{bin}/find rix, @{bin}/find rix,
@ -34,6 +35,7 @@ profile os-prober @{exec_path} flags=(attach_disconnected) {
@{bin}/lvm rPx, @{bin}/lvm rPx,
@{bin}/mkdir rix, @{bin}/mkdir rix,
@{bin}/mktemp rix, @{bin}/mktemp rix,
@{bin}/multipath rPUx,
@{bin}/readlink rix, @{bin}/readlink rix,
@{bin}/rm rix, @{bin}/rm rix,
@{bin}/rmdir rix, @{bin}/rmdir rix,

View file

@ -86,7 +86,7 @@ profile pass @{exec_path} {
owner @{user_cache_dirs}/vim/{,**} rw, owner @{user_cache_dirs}/vim/{,**} rw,
owner @{user_config_dirs}/vim/{,**} rw, owner @{user_config_dirs}/vim/{,**} rw,
/dev/shm/pass.*/{,*} rw, owner /dev/shm/pass.*/{,*} rw,
deny owner @{HOME}/ r, deny owner @{HOME}/ r,
@ -140,6 +140,7 @@ profile pass @{exec_path} {
owner @{user_password_store_dirs}/ rw, owner @{user_password_store_dirs}/ rw,
owner @{user_password_store_dirs}/** rwkl -> @{HOME}/.password-store/**, owner @{user_password_store_dirs}/** rwkl -> @{HOME}/.password-store/**,
owner /dev/shm/pass.*/{,*} rw,
include if exists <local/pass_gpg> include if exists <local/pass_gpg>
} }

View file

@ -33,6 +33,15 @@ profile scrcpy @{exec_path} {
owner @{user_config_dirs}/ibus/bus/ r, owner @{user_config_dirs}/ibus/bus/ r,
owner @{user_config_dirs}/ibus/bus/@{md5}-unix-{,wayland-}@{int} r, owner @{user_config_dirs}/ibus/bus/@{md5}-unix-{,wayland-}@{int} r,
owner @{user_config_dirs}/pulse/client.conf r,
owner @{user_config_dirs}/pulse/cookie r,
owner @{user_config_dirs}/pulse/cookie rk,
owner @{run}/user/@{uid}/pulse/ r,
/dev/shm/ r,
deny @{user_share_dirs}/gvfs-metadata/* r,
include if exists <local/scrcpy> include if exists <local/scrcpy>
} }

View file

@ -17,5 +17,7 @@ profile who @{exec_path} {
@{exec_path} mr, @{exec_path} mr,
deny owner @{user_share_dirs}/gvfs-metadata/{,*} r,
include if exists <local/who> include if exists <local/who>
} }

View file

@ -59,6 +59,8 @@ profile wireplumber @{exec_path} {
@{sys}/devices/pci[0-9]*/**/video4linux/video[0-9]*/uevent r, @{sys}/devices/pci[0-9]*/**/video4linux/video[0-9]*/uevent r,
@{sys}/devices/virtual/dmi/id/bios_vendor r, @{sys}/devices/virtual/dmi/id/bios_vendor r,
owner @{PROC}/@{pid}/task/@{tid}/comm rw,
/dev/media[0-9]* rw, /dev/media[0-9]* rw,
/dev/snd/ r, /dev/snd/ r,