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

abi <abi/3.0>,

include <tunables/global>

@{exec_path} = @{bin}/update-secureboot-policy
profile update-secureboot-policy @{exec_path} {
  include <abstractions/base>
  include <abstractions/consoles>

  @{exec_path} rm,

  @{sh_path}             rix,
  @{bin}/{,m,g}awk       rix,
  @{bin}/dpkg-trigger    rPx,
  @{bin}/find            rix,
  @{bin}/id              rix,
  @{bin}/od              rix,
  @{bin}/sort            rix,
  @{bin}/touch           rix,
  @{bin}/wc              rix,
  /usr/share/debconf/frontend rPx,

  / r,

  /usr/share/debconf/confmodule r,

  /var/lib/dkms/ r,
  /var/lib/shim-signed/dkms-list rw,

  include if exists <local/update-secureboot-policy>
}

# vim:syntax=apparmor
