# 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/3.0>,

include <tunables/global>

@{exec_path} = @{bin}/gnome-characters /usr/share/org.gnome.Characters/org.gnome.Characters
profile gnome-characters @{exec_path} {
  include <abstractions/base>
  include <abstractions/bus-system>
  include <abstractions/bus/org.freedesktop.portal.Desktop>
  include <abstractions/common/gnome>
  include <abstractions/fontconfig-cache-read>
  include <abstractions/nameservice-strict>

  #aa:dbus own bus=session name=org.gnome.Characters interface=org.gnome.Shell.SearchProvider2

  @{exec_path} mr,

  @{bin}/gjs-console rix,

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

  /usr/share/icu/@{int}.@{int}/*.dat r,
  /usr/share/org.gnome.Characters/{,**} r,

  owner @{PROC}/@{pid}/mounts r,
  owner @{PROC}/@{pid}/stat r,
  owner @{PROC}/@{pid}/status r,
  owner @{PROC}/@{pid}/task/@{tid}/stat r,

  include if exists <local/gnome-characters>
}

# vim:syntax=apparmor
