# 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} = /etc/cron.{hourly,daily,weekly,monthly}/etckeeper
profile cron-etckeeper @{exec_path} {
  include <abstractions/base>
  include <abstractions/consoles>

  @{exec_path} r,
  
  @{sh_path}         rix,
  @{bin}/rm          rix,
  @{bin}/find        rix,
  @{bin}/etckeeper   rPx,

  /etc/etckeeper/daily    rix,
  /etc/etckeeper/etckeeper.conf r,

  /var/cache/etckeeper/packagelist.pre-install rw,

  include if exists <local/cron-etckeeper>
}

# vim:syntax=apparmor
