# 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}  = @{lib}/drkonqi
@{exec_path} += @{lib}/@{multiarch}/{,libexec/}drkonqi
profile drkonqi @{exec_path} {
  include <abstractions/base>
  include <abstractions/graphics>
  include <abstractions/kde-strict>

  network inet stream,
  network inet6 stream,
  network netlink raw,

  signal send set=(cont, stop) peer=/usr/bin/akonadiserver,

  ptrace read peer=/usr/bin/akonadiserver,

  @{exec_path} mr,

  @{bin}/lsb_release    rPx -> lsb_release,

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

  owner @{user_cache_dirs}/drkonqi/ rw,
  owner @{user_cache_dirs}/drkonqi/** rwlk -> @{user_cache_dirs}/drkonqi/**,
  owner @{user_cache_dirs}/kcrash-metadata/* w,

  owner @{user_config_dirs}/drkonqirc r,

  /dev/tty r,

  include if exists <local/drkonqi>
}

# vim:syntax=apparmor
