Add Profiles for imv and zathura (#291)

* add profiles

* fix minor issues

* fix read permissions

* remove leftover line
This commit is contained in:
valoq 2024-02-23 20:48:24 +00:00 committed by GitHub
parent 2ea53a9dc3
commit df455f93eb
Failed to generate hash of commit
2 changed files with 61 additions and 0 deletions

View file

@ -0,0 +1,29 @@
# apparmor.d - Full set of apparmor profiles
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/imv-wayland
profile imv @{exec_path} {
include <abstractions/base>
include <abstractions/freedesktop.org>
include <abstractions/fonts>
include <abstractions/fontconfig-cache-read>
include <abstractions/graphics>
include <abstractions/nameservice-strict>
include <abstractions/user-read>
@{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 <local/imv-wayland>
}

View file

@ -0,0 +1,32 @@
# apparmor.d - Full set of apparmor profiles
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/zathura
profile zathura @{exec_path} {
include <abstractions/base>
include <abstractions/freedesktop.org>
include <abstractions/fonts>
include <abstractions/fontconfig-cache-read>
include <abstractions/nameservice-strict>
include <abstractions/dconf-write>
include <abstractions/gtk>
include <abstractions/user-read>
@{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 <local/zathura>
}