From 3018ce3bbd8ef574b29007d045f5c1853184ba93 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Mon, 2 May 2022 18:07:15 +0100 Subject: [PATCH] feat(profiles): add flatpak-portal. --- apparmor.d/profiles-a-f/flatpak-portal | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 apparmor.d/profiles-a-f/flatpak-portal diff --git a/apparmor.d/profiles-a-f/flatpak-portal b/apparmor.d/profiles-a-f/flatpak-portal new file mode 100644 index 00000000..b1d14a7b --- /dev/null +++ b/apparmor.d/profiles-a-f/flatpak-portal @@ -0,0 +1,39 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2022 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{usr/,}lib/flatpak-portal +profile flatpak-portal @{exec_path} flags=(attach_disconnected) { + include + include + + 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 +} \ No newline at end of file