# 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} = @{lib}/systemd/systemd-user-sessions
profile systemd-user-sessions @{exec_path} {
  include <abstractions/base>
  include <abstractions/common/systemd>

  capability net_admin,

  @{exec_path} mr,

  owner @{run}/.#nologin* rw,
  owner @{run}/.#nologin rw,
  owner @{run}/nologin rw,

  @{run}/host/container-manager r,

  include if exists <local/systemd-user-sessions>
}

# vim:syntax=apparmor
