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

abi <abi/3.0>,

include <tunables/global>

@{exec_path} = @{lib}/{,@{multiarch}/}tumbler-1/tumblerd
profile tumblerd @{exec_path} {
  include <abstractions/base>
  include <abstractions/gstreamer>
  include <abstractions/nameservice-strict>
  include <abstractions/thumbnails-cache-write>

  @{exec_path} mr,

  /usr/share/backgrounds/xfce/{,**} r,
  /usr/share/thumbnailers/{,**} r,

  /etc/fstab r,
  /etc/xdg/tumbler/* r,

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

  /dev/ r,

  include if exists <local/tumblerd>
}