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

abi <abi/4.0>,

include <tunables/global>

@{exec_path} = @{lib}/systemd/system-sleep/grub2.sleep
@{att} = ""
profile systemd-sleep-grub /{,usr/}lib{,exec,32,64}/systemd/system-sleep/grub2.sleep flags=(complain) {
  include <abstractions/base-strict>
  include <abstractions/nameservice-strict>

  @{exec_path} mr,

  @{sh_path}              rix,
  @{bin}/{,e}grep         rix,
  @{bin}/uname            rix,

  /etc/sysconfig/bootloader r,

  /dev/tty rw,

  include if exists <local/systemd-sleep-grub>
}

# vim:syntax=apparmor
