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

  abi <abi/4.0>,

  # Accessibility bus

  dbus receive bus=accessibility path=/org/a11y/atspi/registry
       interface=org.a11y.atspi.Registry
       member=EventListenerDeregistered
       peer=(name="@{busname}", label=at-spi2-registryd),

  dbus send bus=accessibility path=/org/a11y/atspi/registry
       interface=org.a11y.atspi.Registry
       member=GetRegisteredEvents
       peer=(name=org.a11y.atspi.Registry, label=at-spi2-registryd),

  dbus send bus=accessibility path=/org/a11y/atspi/registry/deviceeventcontroller
       interface=org.a11y.atspi.DeviceEventController
       member={GetKeystrokeListeners,GetDeviceEventListeners}
       peer=(name=org.a11y.atspi.Registry, label=at-spi2-registryd),

  dbus receive bus=accessibility path=/org/a11y/atspi/accessible/root
       interface=org.freedesktop.DBus.Properties
       member=Set
       peer=(name="@{busname}", label=at-spi2-registryd),

  dbus send bus=accessibility path=/org/a11y/atspi/accessible/root
       interface=org.a11y.atspi.Socket
       member=Embed
       peer=(name=org.a11y.atspi.Registry, label=at-spi2-registryd),

  # Session bus

  dbus send bus=session path=/org/a11y/bus
       interface=org.a11y.Bus
       member=GetAddress
       peer=(name=org.a11y.Bus, label="@{p_dbus_accessibility}"),

  dbus send bus=session path=/org/a11y/bus
       interface=org.a11y.Bus
       member=GetAddress
       peer=(name=org.a11y.Bus),

  include if exists <abstractions/bus/org.a11y.d>

# vim:syntax=apparmor
