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

abi <abi/3.0>,

include <tunables/global>

@{exec_path} = @{lib}/gnome-remote-desktop-daemon
profile gnome-remote-desktop-daemon @{exec_path} {
  include <abstractions/base>
  include <abstractions/bus-session>
  include <abstractions/bus-system>
  include <abstractions/bus/org.freedesktop.PolicyKit1>
  include <abstractions/dconf-write>
  include <abstractions/gnome-strict>
  include <abstractions/graphics>

  network inet stream,
  network inet6 stream,

  #aa:dbus own bus=session name=org.gnome.RemoteDesktop
  #aa:dbus talk bus=system name=org.gnome.DisplayManager label=gdm

  @{exec_path} mr,

  /usr/share/gnome-remote-desktop/{,**} r,

  owner /var/lib/gnome-remote-desktop//{,**} r,

  include if exists <local/gnome-remote-desktop-daemon>
}

# vim:syntax=apparmor
