From 20f59560a47b45b1763eb0618891cf588d7aa366 Mon Sep 17 00:00:00 2001 From: sthen Date: Mon, 11 Apr 2022 09:32:20 +0000 Subject: [PATCH] Fix spamlogd's rc_pre to avoid creating pflog0 if spamd is disabled. The conditional was not checked (prior to r1.2 the exit code from the conditional was implicitly used as the exit code from the whole shell function, but this wasn't adapted when pflog creation was added). Reported/tested by Clint Pachl --- etc/rc.d/spamlogd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/rc.d/spamlogd b/etc/rc.d/spamlogd index ced8f07edbd..45e62ce9ad2 100644 --- a/etc/rc.d/spamlogd +++ b/etc/rc.d/spamlogd @@ -1,6 +1,6 @@ #!/bin/ksh # -# $OpenBSD: spamlogd,v 1.4 2018/01/11 21:09:26 rpe Exp $ +# $OpenBSD: spamlogd,v 1.5 2022/04/11 09:32:20 sthen Exp $ daemon="/usr/libexec/spamlogd" @@ -9,7 +9,7 @@ daemon="/usr/libexec/spamlogd" rc_reload=NO rc_pre() { - [[ ${spamd_flags} != NO && ${spamd_black} == NO ]] + [[ ${spamd_flags} != NO && ${spamd_black} == NO ]] && return 1 if pfctl -si | grep -q Enabled; then ifconfig pflog0 create if ifconfig pflog0; then -- 2.20.1