# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2018-2021 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}/{,at-spi2{,-core}/}at-spi2-registryd
profile at-spi2-registryd @{exec_path} flags=(attach_disconnected) {
  include <abstractions/base>
  include <abstractions/attached/consoles>
  include <abstractions/bus-accessibility>
  include <abstractions/bus-session>
  include <abstractions/bus/org.gnome.SessionManager>
  include <abstractions/X-strict>

  signal (receive) set=(term) peer=gdm,

  #aa:dbus own bus=accessibility name=org.a11y.atspi
  #aa:dbus talk bus=session name=org.a11y.{B,b}us label=dbus-accessibility

  dbus receive bus=session
       interface=org.freedesktop.DBus.Introspectable
       member=Introspect
       peer=(name=:*, label=gnome-shell),

  @{exec_path} mr,

  include if exists <local/at-spi2-registryd>
}

# vim:syntax=apparmor
