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

include <tunables/global>

@{exec_path} = @{lib}/gnome-photos-thumbnailer
@{att} = ""
profile gnome-photos-thumbnailer /{,usr/}lib{,exec,32,64}/gnome-photos-thumbnailer flags=(complain) {
  include <abstractions/base-strict>
  include <abstractions/mime>
  include <abstractions/user-download-strict>

  @{exec_path} mr,

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

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

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

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

# vim:syntax=apparmor
