aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorfeld <feld@FreeBSD.org>2014-11-04 05:56:18 +0800
committerfeld <feld@FreeBSD.org>2014-11-04 05:56:18 +0800
commitcfe4683d6a55c91cb0c2c4a11a3f1c0318cd70b5 (patch)
treead2cfd97d88819200fc7f5e14a187582cf66c483 /security
parent8fff7eff03cc292da98f07a8d0608af194a68ac8 (diff)
downloadfreebsd-ports-graphics-cfe4683d6a55c91cb0c2c4a11a3f1c0318cd70b5.tar.gz
freebsd-ports-graphics-cfe4683d6a55c91cb0c2c4a11a3f1c0318cd70b5.tar.zst
freebsd-ports-graphics-cfe4683d6a55c91cb0c2c4a11a3f1c0318cd70b5.zip
Make it possible to run sshguard without blacklist database by setting
in rc.conf: sshguard_blacklist="" This may fix reliability for some users. PR: 174018
Diffstat (limited to 'security')
-rw-r--r--security/sshguard/Makefile2
-rw-r--r--security/sshguard/files/sshguard.in11
2 files changed, 9 insertions, 4 deletions
diff --git a/security/sshguard/Makefile b/security/sshguard/Makefile
index 9dc5fde9987..33118c65f08 100644
--- a/security/sshguard/Makefile
+++ b/security/sshguard/Makefile
@@ -3,7 +3,7 @@
PORTNAME= sshguard
PORTVERSION= 1.5
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= security
MASTER_SITES= SF/sshguard/sshguard/sshguard-${PORTVERSION}
diff --git a/security/sshguard/files/sshguard.in b/security/sshguard/files/sshguard.in
index 05bf9bc7306..2fd499ab025 100644
--- a/security/sshguard/files/sshguard.in
+++ b/security/sshguard/files/sshguard.in
@@ -80,13 +80,18 @@ command=/usr/sbin/daemon
actual_command="%%PREFIX%%/sbin/sshguard"
procname="${actual_command}"
start_precmd=sshguard_prestart
-command_args="-c ${actual_command} -b ${sshguard_blacklist} \${sshguard_watch_params} -a ${sshguard_safety_thresh} -p ${sshguard_pardon_min_interval} -s ${sshguard_prescribe_interval} -w ${sshguard_whitelistfile} -i ${pidfile}"
+command_args="-c ${actual_command} \${sshguard_blacklist_params} \${sshguard_watch_params} -a ${sshguard_safety_thresh} -p ${sshguard_pardon_min_interval} -s ${sshguard_prescribe_interval} -w ${sshguard_whitelistfile} -i ${pidfile}"
sshguard_prestart()
{
- mkdir -p `dirname ${sshguard_blacklist##*:}`
+ if [ ! -z ${sshguard_blacklist} ]; then
+ mkdir -p $(dirname ${sshguard_blacklist##*:})
+ sshguard_blacklist_params="-b ${sshguard_blacklist}"
+ fi
+
[ -e ${sshguard_whitelistfile} ] || touch ${sshguard_whitelistfile}
- sshguard_watch_params=`echo ${sshguard_watch_logs} | tr : \\\n | sed -e s/^/-l\ /g | tr \\\n \ `
+
+ sshguard_watch_params=$(echo ${sshguard_watch_logs} | tr : \\\n | sed -e s/^/-l\ /g | tr \\\n \ )
}
run_rc_command "$1"