Hi,

this is the diff to update sshguard to last release : 1.5.

Also :

- added rc script
- added a flavor to use /etc/hosts.allow (pf is used by default).

Is it ok ?

Cheers,

Remi.
Index: Makefile
===================================================================
RCS file: /cvs/openbsd/ports/security/sshguard/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- Makefile    18 Oct 2010 21:41:47 -0000      1.3
+++ Makefile    5 Mar 2011 19:32:56 -0000
@@ -2,11 +2,9 @@
 
 COMMENT=       protect against brute force attacks on sshd and others
 
-DISTNAME=      sshguard-1.5rc4
+DISTNAME=      sshguard-1.5
 CATEGORIES=    security
 
-REVISION=      0
-
 # BSD
 PERMIT_PACKAGE_CDROM=  Yes
 PERMIT_PACKAGE_FTP=    Yes
@@ -20,9 +18,16 @@ MASTER_SITES=        ${MASTER_SITE_SOURCEFORGE:
 EXTRACT_SUFX=  .tar.bz2
 
 CONFIGURE_STYLE=gnu
-CONFIGURE_ARGS=        --with-firewall=pf
 USE_GROFF =    Yes
-
 NO_REGRESS=    Yes
+
+FLAVORS =      hosts
+FLAVOR?=
+
+.if ${FLAVOR:L:Mhosts}
+CONFIGURE_ARGS = --with-firewall=hosts
+.else
+CONFIGURE_ARGS = --with-firewall=pf 
+.endif
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/openbsd/ports/security/sshguard/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo    7 Sep 2010 12:23:43 -0000       1.1.1.1
+++ distinfo    5 Mar 2011 19:32:56 -0000
@@ -1,5 +1,5 @@
-MD5 (sshguard-1.5rc4.tar.bz2) = sl2kawJUh5YJ+qmEGhReug==
-RMD160 (sshguard-1.5rc4.tar.bz2) = 0aHYO8dZEDWQywBzPC0z6S9siIM=
-SHA1 (sshguard-1.5rc4.tar.bz2) = AFhTvNIEVmqr4zwXkybjFF+NQsA=
-SHA256 (sshguard-1.5rc4.tar.bz2) = opAocT5cc54BYa91AXq11GvX2kkFaw7aiTwP/tP9bTU=
-SIZE (sshguard-1.5rc4.tar.bz2) = 296447
+MD5 (sshguard-1.5.tar.bz2) = Ebn0f5BR4lvf6Eo2XJYewQ==
+RMD160 (sshguard-1.5.tar.bz2) = e0Yls7Lgz5dLyTXYaLib0NjBieg=
+SHA1 (sshguard-1.5.tar.bz2) = +PcTv7P1yYd7NPaCFCaiKn7sjfM=
+SHA256 (sshguard-1.5.tar.bz2) = tTf4dlRV/fhCT4fUvWleW2dbiOXRZIZUUhN5Rwk+fhk=
+SIZE (sshguard-1.5.tar.bz2) = 303767
Index: patches/patch-src_sshguard_logsuck_c
===================================================================
RCS file: 
/cvs/openbsd/ports/security/sshguard/patches/patch-src_sshguard_logsuck_c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-src_sshguard_logsuck_c
--- patches/patch-src_sshguard_logsuck_c        7 Sep 2010 12:23:43 -0000       
1.1.1.1
+++ patches/patch-src_sshguard_logsuck_c        5 Mar 2011 19:32:56 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-src_sshguard_logsuck_c,v 1.1.1.1 2010/09/07 12:23:43 millert 
Exp $
---- src/sshguard_logsuck.c.orig        Mon Aug  9 02:44:15 2010
-+++ src/sshguard_logsuck.c     Mon Aug 30 13:06:02 2010
+--- src/sshguard_logsuck.c.orig        Wed Feb  9 13:01:47 2011
++++ src/sshguard_logsuck.c     Sat Mar  5 19:27:53 2011
 @@ -242,7 +242,7 @@ int logsuck_getline(char *restrict buf, size_t buflen,
          if (ret > 0) {
              if (kevs[0].filter == EVFILT_READ) {
Index: pkg/MESSAGE
===================================================================
RCS file: /cvs/openbsd/ports/security/sshguard/pkg/MESSAGE,v
retrieving revision 1.2
diff -u -p -r1.2 MESSAGE
--- pkg/MESSAGE 7 Sep 2010 14:06:16 -0000       1.2
+++ pkg/MESSAGE 5 Mar 2011 19:32:56 -0000
@@ -1,13 +1,14 @@
-To use sshguard you must add the following to /etc/pf.conf:
+To use sshguard with:
+
+* pf:
+
+you must add the following to /etc/pf.conf:
 
 table <sshguard> persist
 
 block in quick on egress proto tcp from <sshguard> \
        to any port ssh label "ssh bruteforce"
 
-To start sshguard automatically at boot time, add these lines to /etc/rc.local:
+* hosts:
 
-if [ -x ${PREFIX}/sbin/sshguard ]; then
-       echo -n ' sshguard'
-       ${PREFIX}/sbin/sshguard -l /var/log/authlog >/dev/null 2>&1 &
-fi
+you must have the file /etc/hosts.allow on filesystem.
Index: pkg/PLIST
===================================================================
RCS file: /cvs/openbsd/ports/security/sshguard/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 PLIST
--- pkg/PLIST   7 Sep 2010 12:23:43 -0000       1.1.1.1
+++ pkg/PLIST   5 Mar 2011 19:32:56 -0000
@@ -1,3 +1,4 @@
 @comment $OpenBSD: PLIST,v 1.1.1.1 2010/09/07 12:23:43 millert Exp $
 @man man/man8/sshguard.8
 @bin sbin/sshguard
+@rcscript ${RCDIR}/sshguard
Index: pkg/sshguard.rc
===================================================================
RCS file: pkg/sshguard.rc
diff -N pkg/sshguard.rc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/sshguard.rc     5 Mar 2011 19:32:56 -0000
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# $OpenBSD$
+
+daemon="${TRUEPREFIX}/sbin/sshguard"
+daemon_flags="-l /var/log/authlog"
+
+. /etc/rc.d/rc.subr
+
+rc_reload=NO
+
+rc_cmd $1

Reply via email to