# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2023-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

include <tunables/global>

@{exec_path} = @{lib}/systemd/system-environment-generators/60-flatpak-system-only
profile systemd-generator-environment-flatpak @{exec_path} {
  include <abstractions/base>
  include <abstractions/nameservice-strict>

  @{exec_path} mr,

  @{sh_path}         rix,
  @{bin}/flatpak     rix,

  /usr/{local/,}share/gvfs/remote-volume-monitors/{,*}  r,

  /dev/tty rw,

  include if exists <local/systemd-generator-environment-flatpak>
}

# vim:syntax=apparmor
