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

abi <abi/4.0>,

include <tunables/global>

@{exec_path} = @{lib}/@{multiarch}/polkit-mate/polkit-mate-authentication-agent-[0-9]
profile polkit-mate-authentication-agent @{exec_path} {
  include <abstractions/base>
  include <abstractions/dconf-write>
  include <abstractions/desktop>
  include <abstractions/fontconfig-cache-read>
  include <abstractions/graphics>
  include <abstractions/nameservice-strict>

  signal (send) set=(term, kill) peer=polkit-agent-helper,

  @{exec_path} mr,

  @{lib}/polkit-[0-9]/polkit-agent-helper-[0-9] rPx,

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

        @{PROC}/1/cgroup r,
  owner @{PROC}/@{pid}/cgroup r,
  owner @{PROC}/@{pid}/fd/ r,

  owner /dev/tty@{int} rw,

  include if exists <local/polkit-mate-authentication-agent>
}

# vim:syntax=apparmor
