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

abi <abi/4.0>,

include <tunables/global>

@{exec_path} = /usr/share/grub/grub-check-signatures
profile grub-check-signatures /usr/share/grub/grub-check-signatures flags=(complain) {
  include <abstractions/base>
  include <abstractions/consoles>

  @{exec_path} mr,

  @{sh_path}          rix,
  @{bin}/{m,g,}awk    rix,
  @{bin}//mktemp      rix,
  @{bin}//od          rix,

  /usr/share/debconf/frontend rPx,

  /usr/share/debconf/confmodule r,

  owner /tmp/tmp.*/ rw,

  include if exists <local/grub-check-signatures>
}