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

abi <abi/3.0>,

include <tunables/global>

@{exec_path} = @{bin}/pulseeffects
profile pulseeffects @{exec_path} {
  include <abstractions/base>
  include <abstractions/dconf-write>
  include <abstractions/gtk>
  include <abstractions/fonts>
  include <abstractions/fontconfig-cache-read>
  include <abstractions/freedesktop.org>
  include <abstractions/nameservice-strict>
  include <abstractions/gstreamer>

  network netlink raw,

  @{exec_path} mr,

  /etc/pipewire/pipewire.conf r,
  /etc/pipewire/client.conf r,

  owner @{user_config_dirs}/PulseEffects/ rw,
  owner @{user_config_dirs}/PulseEffects/** rw,

  owner @{user_config_dirs}/autostart/pulseeffects-service.desktop w,

  owner @{PROC}/@{pid}/cmdline r,
  owner @{PROC}/@{pid}/fd/ r,

  # file_inherit
  owner /dev/tty@{int} rw,

  include if exists <local/pulseeffects>
}

# vim:syntax=apparmor
