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

# TODO: ensure we use apparmor namespace here

abi <abi/4.0>,

include <tunables/global>

@{exec_path} = @{bin}/systemd-nspawn
@{att} = /att/systemd-nspawn/
profile systemd-nspawn /{,usr/}bin/systemd-nspawn flags=(attach_disconnected,attach_disconnected.path=@{att},mediate_deleted,complain) {
  include <abstractions/attached/base>

  all,

  @{exec_path} mr,

  include if exists <local/systemd-nspawn>
}

# vim:syntax=apparmor
