diff --git a/apparmor.d/profiles-a-f/flatpak-system-helper b/apparmor.d/profiles-a-f/flatpak-system-helper new file mode 100644 index 00000000..3c8f6a0e --- /dev/null +++ b/apparmor.d/profiles-a-f/flatpak-system-helper @@ -0,0 +1,58 @@ +# 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-system-helper +profile flatpak-system-helper @{exec_path} { + include + include + include + include + + capability chown, + capability dac_override, + capability net_admin, + capability setgid, + capability setuid, + capability sys_nice, + + @{exec_path} mr, + + /{usr/,}bin/bwrap rPUx, + /{usr/,}bin/gpg rCx -> gpg, + /{usr/,}bin/gpgconf rCx -> gpg, + /{usr/,}bin/gpgsm rCx -> gpg, + /{usr/,}lib/revokefs-fuse rix, + + /etc/flatpak/{,**} r, + + /usr/share/flatpak/triggers/ r, + + /var/lib/flatpak/{,**} rwkl, + /var/tmp/flatpak-cache-*/{,**} rw, + + owner /tmp/#[0-9]* rw, + owner /tmp/ostree-gpg-*/ rw, + owner /tmp/ostree-gpg-*/** rwkl -> /tmp/ostree-gpg-*/**, + + owner @{PROC}/@{uid}/fd/ r, + + profile gpg { + include + include + + /{usr/,}bin/gpg mr, + /{usr/,}bin/gpgconf mr, + /{usr/,}bin/gpgsm mr, + + owner /tmp/ostree-gpg-*/ r, + owner /tmp/ostree-gpg-*/** rwkl -> /tmp/ostree-gpg-*/**, + + } + + include if exists +} \ No newline at end of file