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

abi <abi/4.0>,

include <tunables/global>

@{exec_path} = @{bin}/pinentry-qt
profile pinentry-qt @{exec_path} {
  include <abstractions/base>
  include <abstractions/consoles>
  include <abstractions/fontconfig-cache-read>
  include <abstractions/graphics>
  include <abstractions/kde-strict>
  include <abstractions/nameservice-strict>
  include <abstractions/qt5-compose-cache-write>

  @{exec_path} mr,

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

  owner @{tmp}/xauth_@{rand6} r,
  owner /dev/shm/#@{int} rw,

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

  include if exists <local/pinentry-qt>
}

# vim:syntax=apparmor
