# 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}/gmenudbusmenuproxy
profile gmenudbusmenuproxy @{exec_path} {
  include <abstractions/base>
  include <abstractions/gtk>
  include <abstractions/kde-strict>
  include <abstractions/nameservice-strict>

  ptrace (read) peer=kded,

  @{exec_path} mr,

  /etc/machine-id r,
  /var/lib/dbus/machine-id r,

  owner @{HOME}/.gtkrc-2.0 rw,
  owner @{user_config_dirs}/gtk-{2,3}.0/#@{int} rw,
  owner @{user_config_dirs}/gtk-{2,3}.0/settings.ini{,.@{rand6}} rwl,
  owner @{user_config_dirs}/gtk-{2,3}.0/settings.ini.lock rwk,

  include if exists <local/gmenudbusmenuproxy>
}

# vim:syntax=apparmor
