# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021 Mikhail Morfikov
# 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}/{,gvfs/}gvfsd-archive
profile gvfsd-archive @{exec_path} {
  include <abstractions/base>
  include <abstractions/freedesktop.org>
  include <abstractions/nameservice-strict>

  @{exec_path} mr,

  owner @{HOME}/**.{tar,tar.gz,zip} r,
  owner @{MOUNTS}/**.{TAR,TAR.GZ,ZIP} r,
  owner @{HOME}/**.{tar,tar.gz,zip} r,

  owner @{user_img_dirs}/{,**} r,

  include if exists <local/gvfsd-archive>
}
