# 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} = @{bin}/fail2ban-client
@{att} = /att/fail2ban-client/
profile fail2ban-client /{,usr/}bin/fail2ban-client  flags=(attach_disconnected,attach_disconnected.path=@{att},complain) {
  include <abstractions/attached/base>
  include <abstractions/nameservice-strict>
  include <abstractions/python>

  @{exec_path} mr,

  @{bin}/ r,
  @{python_path} r,

  /etc/fail2ban/{,**} r,

  include if exists <local/fail2ban-client>
}

# vim:syntax=apparmor
