# 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 /{,usr/}lib{,exec,32,64}/systemd/systemd-userwork  flags=(attach_disconnected,complain) {
  include <abstractions/base>
  include <abstractions/nameservice-strict>
  include <abstractions/common/systemd>

  capability sys_resource,

  signal (send) peer=@{systemd},

  @{exec_path} mr,

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

  include if exists <local/systemd-userwork>
}