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

abi <abi/4.0>,

include <tunables/global>

profile gnome-desktop-thumbnailers flags=(attach_disconnected) {
  include <abstractions/base>
  include <abstractions/common/bwrap>
  include <abstractions/gnome-strict>
  include <abstractions/gstreamer>

  capability dac_override,

  @{bin}/bwrap mr,
  @{bin}/*-thumbnailer rix,

  /usr/share/ladspa/rdf/{,**} r,
  /usr/share/poppler/{,**} r,

  owner @{user_cache_dirs}/gnome-desktop-thumbnailer/{,**} rw,

  owner @{tmp}/flatpak-seccomp-@{rand6} rw,
  owner @{tmp}/gnome-desktop-file-to-thumbnail.* r,
  owner @{tmp}/gnome-desktop-thumbnailer.png w,
  owner @{tmp}/gsf-thumbnailer-@{rand6} rw,

  include if exists <local/gnome-desktop-thumbnailers>
}

# vim:syntax=apparmor
