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

abi <abi/4.0>,

include <tunables/global>

@{exec_path} = @{bin}/gnome-disk-image-mounter
profile gnome-disk-image-mounter /{,usr/}{,s}bin/gnome-disk-image-mounter flags=(complain) {
  include <abstractions/base>
  include <abstractions/dconf-write>
  include <abstractions/gnome-strict>

  @{exec_path} mr,

  # Allow to mount user files
  owner @{HOME}/{,**} r,
  owner @{MOUNTS}/{,**} r,
  owner /tmp/*/{,**} r,

  @{run}/mount/utab r,

  owner @{PROC}/@{pid}/mountinfo r,

  include if exists <local/gnome-disk-image-mounter>
}