# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2017-2021 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}/pavucontrol
profile pavucontrol @{exec_path} {
  include <abstractions/base>
  include <abstractions/audio-client>
  include <abstractions/dconf-write>
  include <abstractions/desktop>
  include <abstractions/fontconfig-cache-read>

  @{exec_path} mr,

  /usr/share/pavucontrol/** r,

  /var/lib/dbus/machine-id r,
  /etc/machine-id r,

  owner @{user_config_dirs}/ r,
  owner @{user_config_dirs}/pavucontrol.ini* rw,

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

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

  include if exists <local/pavucontrol>
}

# vim:syntax=apparmor
