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

abi <abi/3.0>,

include <tunables/global>

@{exec_path} = @{lib}/gnome-photos-thumbnailer
profile gnome-photos-thumbnailer @{exec_path} {
  include <abstractions/base>
  include <abstractions/user-download-strict>

  @{exec_path} mr,

  /usr/share/mime/mime.cache r,

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

  owner @{user_cache_dirs}/babl/{,**} r,
  owner @{user_cache_dirs}/gegl-*/{,**} r,
  owner @{user_cache_dirs}/gnome-photos/thumbnails/{,**} rw,
  owner @{user_share_dirs}/gegl-*/{,**} r,

  owner /dev/shm/DzlCounters-@{int} rw,

  include if exists <local/gnome-photos-thumbnailer>
}

# vim:syntax=apparmor
