From: sthen Date: Mon, 11 Apr 2022 09:32:20 +0000 (+0000) Subject: Fix spamlogd's rc_pre to avoid creating pflog0 if spamd is disabled. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=20f59560a47b45b1763eb0618891cf588d7aa366;p=openbsd 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 --- 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