diff --git a/apparmor.d/groups/apt/apt-helper b/apparmor.d/groups/apt/apt-helper new file mode 100644 index 00000000..8c8d0eb6 --- /dev/null +++ b/apparmor.d/groups/apt/apt-helper @@ -0,0 +1,22 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2023 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = @{lib}/apt/apt-helper +profile apt-helper @{exec_path} { + include + include + + @{exec_path} mr, + + @{bin}/nm-online rPx, + @{bin}/systemctl rPx -> child-systemctl, + + owner @{PROC}/@{pid}/fd/ r, + + include if exists +} \ No newline at end of file diff --git a/apparmor.d/groups/freedesktop/xdg-desktop-portal-rewrite-launchers b/apparmor.d/groups/freedesktop/xdg-desktop-portal-rewrite-launchers new file mode 100644 index 00000000..c3b7d0c6 --- /dev/null +++ b/apparmor.d/groups/freedesktop/xdg-desktop-portal-rewrite-launchers @@ -0,0 +1,18 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2023 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = @{lib}/xdg-desktop-portal-rewrite-launchers +profile xdg-desktop-portal-rewrite-launchers @{exec_path} { + include + include + include + + @{exec_path} mr, + + include if exists +} \ No newline at end of file diff --git a/apparmor.d/profiles-g-l/jitterentropy-rngd b/apparmor.d/profiles-g-l/jitterentropy-rngd new file mode 100644 index 00000000..5921dcc9 --- /dev/null +++ b/apparmor.d/profiles-g-l/jitterentropy-rngd @@ -0,0 +1,21 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2023 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = @{bin}/jitterentropy-rngd +profile jitterentropy-rngd @{exec_path} { + include + + capability sys_admin, + + @{exec_path} mr, + + @{PROC}/sys/kernel/random/entropy_avail r, + @{PROC}/sys/kernel/random/write_wakeup_threshold r, + + include if exists +} \ No newline at end of file diff --git a/apparmor.d/profiles-m-r/mate-notification-daemon b/apparmor.d/profiles-m-r/mate-notification-daemon new file mode 100644 index 00000000..2f8c60e7 --- /dev/null +++ b/apparmor.d/profiles-m-r/mate-notification-daemon @@ -0,0 +1,22 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2022 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = @{lib}/mate-notification-daemon/mate-notification-daemon +profile mate-notification-daemon @{exec_path} { + include + include + include + + @{exec_path} mr, + + /usr/share/glib-2.0/schemas/gschemas.compiled r, + + owner @{HOME}/.Xauthority r, + + include if exists +} \ No newline at end of file diff --git a/apparmor.d/profiles-s-z/terminator b/apparmor.d/profiles-s-z/terminator new file mode 100644 index 00000000..78909613 --- /dev/null +++ b/apparmor.d/profiles-s-z/terminator @@ -0,0 +1,64 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2023 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = @{bin}/terminator +profile terminator @{exec_path} flags=(attach_disconnected) { + include + include + include + include + include + include + include + include + include + include + + capability sys_ptrace, + + ptrace, + + @{exec_path} mr, + + @{bin}/ r, + @{bin}/python3.[0-9]* rix, + + # The shell is not confined on purpose. + @{bin}/{,b,d,rb}ash rUx, + @{bin}/{c,k,tc,z}sh rUx, + + owner @{user_config_dirs}/terminator/{,**} rw, + + owner /tmp/#@{int} rw, + + @{PROC}/ r, + @{PROC}/@{pid}/net/tcp{,6} r, + @{PROC}/@{pid}/net/udp{,6} r, + @{PROC}/@{pids}/cmdline r, + @{PROC}/@{pids}/stat r, + @{PROC}/1/cgroup r, + owner @{PROC}/@{pid}/cgroup r, + owner @{PROC}/@{pid}/environ r, + owner @{PROC}/@{pid}/fd/ r, + owner @{PROC}/@{pid}/fdinfo/@{tid} r, + owner @{PROC}/@{pid}/io r, + owner @{PROC}/@{pid}/mounts r, + owner @{PROC}/@{pid}/smaps r, + owner @{PROC}/@{pid}/smaps_rollup r, + owner @{PROC}/@{pid}/statm r, + owner @{PROC}/@{pid}/task/ r, + owner @{PROC}/@{pid}/task/@{tid}/stat r, + + /dev/ r, + /dev/dri/card@{int} rw, + /dev/ptmx rw, + + deny @{user_share_dirs}/gvfs-metadata/{,*} r, + + include if exists +} \ No newline at end of file diff --git a/dists/flags/main.flags b/dists/flags/main.flags index bc1e89a9..7af50169 100644 --- a/dists/flags/main.flags +++ b/dists/flags/main.flags @@ -189,6 +189,7 @@ install-info complain irqbalance attach_disconnected,complain iwctl complain iwd complain +jitterentropy-rngd complain kaccess complain kactivitymanagerd complain kalendarac complain @@ -233,6 +234,7 @@ lvmconfig complain lvmdump complain lvmpolld complain man complain +mate-notification-daemon complain mdevctl complain mke2fs complain ModemManager attach_disconnected,complain @@ -380,6 +382,7 @@ systemd-userwork complain systemd-vconsole-setup complain systemd.service attach_disconnected,complain systemsettings complain +terminator complain thunderbird complain thunderbird-glxtest complain thunderbird-vaapitest complain