diff options
author | feld <feld@FreeBSD.org> | 2014-11-04 05:56:18 +0800 |
---|---|---|
committer | feld <feld@FreeBSD.org> | 2014-11-04 05:56:18 +0800 |
commit | cfe4683d6a55c91cb0c2c4a11a3f1c0318cd70b5 (patch) | |
tree | ad2cfd97d88819200fc7f5e14a187582cf66c483 /security | |
parent | 8fff7eff03cc292da98f07a8d0608af194a68ac8 (diff) | |
download | freebsd-ports-gnome-cfe4683d6a55c91cb0c2c4a11a3f1c0318cd70b5.tar.gz freebsd-ports-gnome-cfe4683d6a55c91cb0c2c4a11a3f1c0318cd70b5.tar.zst freebsd-ports-gnome-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/Makefile | 2 | ||||
-rw-r--r-- | security/sshguard/files/sshguard.in | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/security/sshguard/Makefile b/security/sshguard/Makefile index 9dc5fde9987e..33118c65f086 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 05bf9bc73065..2fd499ab0256 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" |