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

include <tunables/global>

@{exec_path} = @{bin}/kglobalaccel5 @{lib}/kglobalacceld
profile kglobalacceld @{exec_path} {
  include <abstractions/base>
  include <abstractions/kde-strict>

  @{exec_path} mr,

  @{bin}/kstart rPx,

  /usr/share/kglobalaccel/{,**} r,

  /etc/machine-id r,
  /etc/xdg/menus/ r,
  /etc/xdg/menus/applications-merged/ r,

  owner @{user_config_dirs}/#@{int} rw,
  owner @{user_config_dirs}/kglobalshortcutsrc.lock rwk,
  owner @{user_config_dirs}/kglobalshortcutsrc* rwl,
  owner @{user_config_dirs}/khotkeysrc r,
  owner @{user_config_dirs}/menus/ r,
  owner @{user_config_dirs}/menus/applications-merged/ r,

  @{PROC}/sys/kernel/random/boot_id r,

  /dev/tty r,

  include if exists <local/kglobalacceld>
}

# vim:syntax=apparmor
