# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/4.0>,

include <tunables/global>

@{exec_path} = @{bin}/systemd-cgls
profile systemd-cgls @{exec_path} {
  include <abstractions/base>

  ptrace (read),

  @{exec_path} mr,

  @{pager_path} rPx -> child-pager,

  @{sys}/fs/cgroup/{,**} r,

  @{PROC}/@{pids}/cgroup r,
  @{PROC}/@{pids}/cmdline r,
  @{PROC}/@{pids}/stat r,

  include if exists <local/systemd-cgls>
}

# vim:syntax=apparmor
