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

abi <abi/4.0>,

include <tunables/global>

@{exec_path} = @{bin}/gnome-contacts
profile gnome-contacts @{exec_path} {
  include <abstractions/base>
  include <abstractions/bus/org.freedesktop.portal.Desktop>
  include <abstractions/common/gnome>
  include <abstractions/gstreamer>
  include <abstractions/nameservice-strict>
  include <abstractions/ssl_certs>

  network netlink raw,

  #aa:dbus own bus=session name=org.gnome.Contacts

  #aa:dbus talk bus=session name=org.gnome.evolution.dataserver.AddressBookFactory label=evolution-addressbook-factory
  #aa:dbus talk bus=session name=org.gnome.evolution.dataserver.Source label=evolution-source-registry
  #aa:dbus talk bus=session name=org.gnome.OnlineAccounts label=goa-daemon

  @{exec_path} mr,
  @{open_path}  rPx -> child-open-help,

  owner @{user_cache_dirs}/evolution/addressbook/{,**} r,
  owner @{user_share_dirs}/folks/relationships.ini r,

  include if exists <local/gnome-contacts>
}

# vim:syntax=apparmor
