From 373ccd45d93accc35eaf8abd43d6c415229cd217 Mon Sep 17 00:00:00 2001 From: skenizen Date: Wed, 12 Jul 2023 10:57:46 +0200 Subject: [PATCH] changed the occurence of path /etc/pf.conf in the rdr.sh script for reading it as a variable from the bastille configuration. --- usr/local/etc/bastille/bastille.conf.sample | 3 +++ usr/local/share/bastille/rdr.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/usr/local/etc/bastille/bastille.conf.sample b/usr/local/etc/bastille/bastille.conf.sample index 22fc18dd..2e1bec97 100644 --- a/usr/local/etc/bastille/bastille.conf.sample +++ b/usr/local/etc/bastille/bastille.conf.sample @@ -11,6 +11,9 @@ bastille_releasesdir="${bastille_prefix}/releases" ## default bastille_templatesdir="${bastille_prefix}/templates" ## default: "${bastille_prefix}/templates" bastille_logsdir="/var/log/bastille" ## default: "/var/log/bastille" +## pf configuration path +bastille_pf_conf="/etc/pf.conf" ## default: "/etc/pf.conf" + ## bastille scripts directory (assumed by bastille pkg) bastille_sharedir="/usr/local/share/bastille" ## default: "/usr/local/share/bastille" diff --git a/usr/local/share/bastille/rdr.sh b/usr/local/share/bastille/rdr.sh index 9ae55596..3562e699 100644 --- a/usr/local/share/bastille/rdr.sh +++ b/usr/local/share/bastille/rdr.sh @@ -88,7 +88,7 @@ check_jail_validity() { fi # Check if ext_if is defined in pf.conf - EXT_IF=$(grep "^[[:space:]]*${bastille_network_pf_ext_if}[[:space:]]*=" /etc/pf.conf) + EXT_IF=$(grep "^[[:space:]]*${bastille_network_pf_ext_if}[[:space:]]*=" ${bastille_pf_conf}) if [ -z "${EXT_IF}" ]; then error_exit "bastille_network_pf_ext_if (${bastille_network_pf_ext_if}) not defined in pf.conf" fi