# 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>

@{exec_path} = @{bin}/xfce4-screensaver
profile xfce-screensaver /{,usr/}{,s}bin/xfce4-screensaver  flags=(attach_disconnected,complain) {
  include <abstractions/base>
  include <abstractions/authentication>
  include <abstractions/graphics>
  include <abstractions/xfce>
  include <abstractions/nameservice-strict>

  @{exec_path} mr,

  @{sh_path}    rix,
  @{bin}/pidof  rix,
  @{bin}/wc     rix,

  @{lib}/xfce4-screensaver-dialog rix,
  @{lib}/xfce4-screensaver-gl-helper rix,

  /etc/xdg/menus/xfce4-screensavers.menu r,

  @{run}/systemd/inhibit/*.ref rw,

  include if exists <local/xfce-screensaver>
}

# vim:syntax=apparmor
