# 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-power-manager
profile xfce-power-manager /{,usr/}{,s}bin/xfce4-power-manager  flags=(attach_disconnected,complain) {
  include <abstractions/base>
  include <abstractions/xfce>
  include <abstractions/nameservice-strict>

  @{exec_path} mr,

  @{bin}/xfpm-power-backlight-helper rpx,

  /etc/xdg/autostart/xfce4-power-manager.desktop r,

  owner @{PROC}/@{pid}/cgroup r,
  owner @{PROC}/@{pid}/stat r,

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

  include if exists <local/xfce-power-manager>
}

# vim:syntax=apparmor
