feat(profiles): add flatpak-portal.

This commit is contained in:
Alexandre Pujol 2022-05-02 18:07:15 +01:00
parent 8b18e79796
commit 3018ce3bbd
Failed to generate hash of commit

View file

@ -0,0 +1,39 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2022 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}lib/flatpak-portal
profile flatpak-portal @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/nameservice-strict>
capability sys_ptrace,
network netlink raw,
ptrace (read) peer=xdg-dbus-proxy,
signal (send) peer=unconfined,
@{exec_path} mr,
/{usr/,}bin/flatpak rUx,
/usr/share/mime/mime.cache r,
/usr/share/xdg-desktop-portal/portals/{,*.portal} r,
/ r,
/.flatpak-info r,
owner @{user_config_dirs}/user-dirs.dirs r,
owner @{run}/user/@{uid}/.flatpak/[0-9]*/bwrapinfo.json r,
owner @{run}/user/@{uid}/.flatpak/[0-9]*/info r,
owner @{run}/user/@{uid}/.flatpak/[0-9]*/pid r,
include if exists <local/flatpak-portal>
}