# 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/3.0>,

include <tunables/global>

@{exec_path} = @{bin}/gnome-disk-image-mounter
profile gnome-disk-image-mounter @{exec_path} {
  include <abstractions/base>
  include <abstractions/dconf-write>
  include <abstractions/deny-sensitive-home>
  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>
}

# vim:syntax=apparmor
