# 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-userwork
profile systemd-userwork @{exec_path} flags=(attach_disconnected) {
  include <abstractions/base>
  include <abstractions/nameservice-strict>
  include <abstractions/common/systemd>

  capability sys_resource,

  signal (send) peer=@{p_systemd},

  @{exec_path} mr,

  /etc/machine-id r,
  /etc/shadow r,

  include if exists <local/systemd-userwork>
}

# vim:syntax=apparmor
