feat(profile): split evince profiles in multiple files.

This commit is contained in:
Alexandre Pujol 2023-08-17 18:47:53 +01:00
parent f3ab8d2c71
commit 5ee31716ae
Failed to generate hash of commit
3 changed files with 41 additions and 26 deletions

View file

@ -9,15 +9,16 @@ include <tunables/global>
@{exec_path} = @{bin}/evince @{lib}/evinced
profile evince @{exec_path} {
include <abstractions/base>
include <abstractions/dbus-accessibility-strict>
include <abstractions/dbus-session-strict>
include <abstractions/dconf-write>
include <abstractions/gnome>
include <abstractions/ibus>
include <abstractions/nameservice-strict>
include <abstractions/openssl>
include <abstractions/user-download-strict>
include <abstractions/user-read>
include <abstractions/user-write>
include <abstractions/dbus-session-strict>
include <abstractions/dbus-accessibility-strict>
include <abstractions/ibus>
# also denies network mounts
deny network inet,
@ -111,26 +112,3 @@ profile evince @{exec_path} {
include if exists <local/evince>
}
profile evince-previewer /{,usr/}bin/evince-previewer {
include <abstractions/base>
include <abstractions/dbus-accessibility-strict>
include <abstractions/dbus-session-strict>
unix (send, receive, connect) type=stream peer=(addr="@/tmp/.X11-unix/X[0-9]*", label=xorg),
/{,usr/}bin/evince-previewer mr,
# X-tiny
owner @{HOME}/.Xauthority r,
include if exists <local/evince-previewer>
}
profile evince-thumbnailer /{,usr/}bin/evince-thumbnailer {
include <abstractions/base>
/{,usr/}bin/evince-thumbnailer mr,
include if exists <local/evince-thumbnailer>
}

View file

@ -0,0 +1,21 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/evince-previewer
profile evince-previewer @{exec_path} {
include <abstractions/base>
include <abstractions/dbus-accessibility-strict>
include <abstractions/dbus-session-strict>
include <abstractions/dconf-write>
include <abstractions/freedesktop.org>
include <abstractions/X-strict>
@{exec_path} mr,
include if exists <local/evince-previewer>
}

View file

@ -0,0 +1,16 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/evince-thumbnailer
profile evince-thumbnailer @{exec_path} {
include <abstractions/base>
@{exec_path} mr,
include if exists <local/evince-thumbnailer>
}