Add xdg-desktop-portal.

This commit is contained in:
Alexandre Pujol 2021-10-07 14:56:01 +01:00
parent be82c4cde8
commit 1a31d8271e
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC
2 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,33 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}lib/xdg-desktop-portal
profile xdg-desktop-portal @{exec_path} {
include <abstractions/base>
include <abstractions/nameservice-strict>
network netlink raw,
@{exec_path} mr,
/usr/share/glib-2.0/schemas/gschemas.compiled r,
/usr/share/mime/mime.cache r,
/usr/share/pipewire/client.conf r,
/usr/share/xdg-desktop-portal/portals/{,*.portal} r,
owner @{user_config_dirs}/user-dirs.dirs r,
include <abstractions/dconf>
owner @{run}/user/@{uid}/dconf/ rw,
owner @{run}/user/@{uid}/dconf/user rw,
@{PROC}/sys/kernel/osrelease r,
@{PROC}/cmdline r,
include if exists <local/xdg-desktop-portal>
}

View File

@ -0,0 +1,25 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}lib/xdg-desktop-portal-gtk
profile xdg-desktop-portal-gtk @{exec_path} {
include <abstractions/base>
include <abstractions/fonts>
include <abstractions/freedesktop.org>
@{exec_path} mr,
/usr/share/glib-2.0/schemas/gschemas.compiled r,
/usr/share/themes/{,**} r,
/usr/share/X11/xkb/{,**} r,
include <abstractions/dconf>
owner @{run}/user/@{uid}/dconf/user rw,
include if exists <local/xdg-desktop-portal-gtk>
}