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

abi <abi/4.0>,

include <tunables/global>

@{exec_path} = @{lib}/systemd/system-generators/snapd-generator
@{att} = /att/systemd-generator-snapd/
profile systemd-generator-snapd /{,usr/}lib{,exec,32,64}/systemd/system-generators/snapd-generator  flags=(attach_disconnected,attach_disconnected.path=@{att},complain) {
  include <abstractions/attached/base>

  ptrace read peer=@{p_systemd},

  @{exec_path} mr,

  @{PROC}/1/mountinfo r,

  include if exists <local/systemd-generator-snapd>
}

# vim:syntax=apparmor
