# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2023 Jeroen Rijken
# 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}/kstart
profile kstart @{exec_path} flags=(attach_disconnected) {
  include <abstractions/base>
  include <abstractions/bus-accessibility>
  include <abstractions/dri>
  include <abstractions/fontconfig-cache-read>
  include <abstractions/kde-open5>
  include <abstractions/kde-strict>
  include <abstractions/mesa>
  include <abstractions/nameservice-strict>

  @{exec_path} mr,

  @{bin}/** rPUx,
  @{bin}/konsole rPx,

  owner @{user_share_dirs}/kservices{5,6}/ r,
  owner @{user_share_dirs}/kservices{5,6}/ServiceMenus/ r,

  @{PROC}/sys/dev/i915/perf_stream_paranoid r,

  include if exists <local/kstart>
}

# vim:syntax=apparmor
