# 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}/{,kf6/}kauth/{,libexec/}kded-smart-helper
profile kauth-kded-smart-helper @{exec_path} {
  include <abstractions/base>
  include <abstractions/bus-system>
  include <abstractions/bus/org.freedesktop.PolicyKit1>
  include <abstractions/nameservice-strict>

  #aa:dbus own bus=system name=org.kde.kded.smart

  dbus send bus=system path=/
       interface=org.kde.kf5auth
       member=remoteSignal
       peer=(name=org.freedesktop.DBus, label=kded5),

  @{exec_path} mr,

  @{bin}/smartctl rPx,

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

  include if exists <local/kauth-kded-smart-helper>
}

# vim:syntax=apparmor
