diff options
author | arved <arved@FreeBSD.org> | 2011-07-25 02:16:30 +0800 |
---|---|---|
committer | arved <arved@FreeBSD.org> | 2011-07-25 02:16:30 +0800 |
commit | e6b5ea1d3783bec61cff0c12f46b506df7e08c92 (patch) | |
tree | 7acaecb75142db637c84c843956458d2d4a259af /security/sshguard | |
parent | d82494ead1477587260b22662359878f978c6b06 (diff) | |
download | freebsd-ports-gnome-e6b5ea1d3783bec61cff0c12f46b506df7e08c92.tar.gz freebsd-ports-gnome-e6b5ea1d3783bec61cff0c12f46b506df7e08c92.tar.zst freebsd-ports-gnome-e6b5ea1d3783bec61cff0c12f46b506df7e08c92.zip |
Fix sshguared-ipfw -b option
PR: 157807
Submitted by: Dmitry <smallcms@gmail.com>
Approved by: maintainer timeout
Diffstat (limited to 'security/sshguard')
-rw-r--r-- | security/sshguard/Makefile | 1 | ||||
-rw-r--r-- | security/sshguard/files/patch-src-sshguard.c | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/security/sshguard/Makefile b/security/sshguard/Makefile index 0cd991044c52..53e3c053105e 100644 --- a/security/sshguard/Makefile +++ b/security/sshguard/Makefile @@ -7,6 +7,7 @@ PORTNAME= sshguard PORTVERSION= 1.5 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= SF/sshguard/sshguard/sshguard-${PORTVERSION} diff --git a/security/sshguard/files/patch-src-sshguard.c b/security/sshguard/files/patch-src-sshguard.c new file mode 100644 index 000000000000..27249cfe0933 --- /dev/null +++ b/security/sshguard/files/patch-src-sshguard.c @@ -0,0 +1,21 @@ +--- src/sshguard.c.orig 2010-08-09 08:44:15.000000000 +0200 ++++ src/sshguard.c 2011-03-28 11:42:42.000000000 +0200 +@@ -566,9 +566,13 @@ + /* terminate array list */ + addresses[i] = NULL; + /* do block addresses of this kind */ +- if (fw_block_list(addresses, addrkind, service_codes) != FWALL_OK) { +- sshguard_log(LOG_CRIT, "While blocking blacklisted addresses, the firewall refused to block!"); +- } ++ if (addresses[0] == NULL) { ++ sshguard_log(LOG_DEBUG, "No %s addresses in loaded blacklist.", (addrkind == ADDRKIND_IPv4) ? "IPv4" : "IPv6"); ++ } else { ++ if (fw_block_list(addresses, addrkind, service_codes) != FWALL_OK) { ++ sshguard_log(LOG_CRIT, "While blocking blacklisted addresses, the firewall refused to block!"); ++ } ++ } + } + /* free temporary arrays */ + free(addresses); + + |