# 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/3.0>,

include <tunables/global>

@{exec_path} = @{lib}/systemd/system-generators/systemd-fstab-generator
profile systemd-generator-fstab @{exec_path} {
  include <abstractions/base>
  include <abstractions/common/systemd>

  capability dac_override,
  capability dac_read_search,
  capability mknod,

  @{exec_path} mr,

  /etc/fstab r,

  @{run}/systemd/generator/** w,

  @{PROC}/@{pid}/cgroup r,

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

# vim:syntax=apparmor
