From df455f93eb6a6f19bed81b2a3e3fbc60a377ad25 Mon Sep 17 00:00:00 2001 From: valoq Date: Fri, 23 Feb 2024 20:48:24 +0000 Subject: [PATCH] Add Profiles for imv and zathura (#291) * add profiles * fix minor issues * fix read permissions * remove leftover line --- apparmor.d/groups/apps/imv-wayland | 29 +++++++++++++++++++++++++++ apparmor.d/groups/apps/zathura | 32 ++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 apparmor.d/groups/apps/imv-wayland create mode 100644 apparmor.d/groups/apps/zathura diff --git a/apparmor.d/groups/apps/imv-wayland b/apparmor.d/groups/apps/imv-wayland new file mode 100644 index 00000000..bd727a31 --- /dev/null +++ b/apparmor.d/groups/apps/imv-wayland @@ -0,0 +1,29 @@ +# apparmor.d - Full set of apparmor profiles +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = @{bin}/imv-wayland +profile imv @{exec_path} { + include + include + include + include + include + include + include + + @{exec_path} mr, + + /etc/imv_config r, + /usr/share/X11/xkb/** r, + /tmp/ r, + + owner @{user_config_dirs}/imv/config r, + + owner @{run}/user/@{uid}/imv-*.sock w, + + include if exists +} diff --git a/apparmor.d/groups/apps/zathura b/apparmor.d/groups/apps/zathura new file mode 100644 index 00000000..8a59be64 --- /dev/null +++ b/apparmor.d/groups/apps/zathura @@ -0,0 +1,32 @@ +# apparmor.d - Full set of apparmor profiles +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = @{bin}/zathura +profile zathura @{exec_path} { + include + include + include + include + include + include + include + include + + @{exec_path} mr, + + /usr/share/file/{,**} r, + /usr/share/X11/xkb/{,**} r, + /etc/xdg/{,**} r, + /etc/zathurarc r, + + owner @{user_config_dirs}/zathura/** r, + owner @{user_share_dirs}/zathura/** rwk, + + owner /tmp/gtkprint* rw, + + include if exists +}