# 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}/loginctl
profile loginctl @{exec_path} {
  include <abstractions/base>
  include <abstractions/bus-system>
  include <abstractions/bus/org.freedesktop.login1.Session>
  include <abstractions/bus/org.freedesktop.login1>
  include <abstractions/common/systemd>

  capability net_admin,
  capability sys_resource,

  @{exec_path} mr,

  @{bin}/less  rPx -> child-pager,
  @{bin}/more  rPx -> child-pager,
  @{bin}/pager rPx -> child-pager,

  include if exists <local/loginctl>
}

# vim:syntax=apparmor
