diff --git a/security/bruteblock/Makefile b/security/bruteblock/Makefile index 989f5b1ec0b7..20033d9fcfb8 100644 --- a/security/bruteblock/Makefile +++ b/security/bruteblock/Makefile @@ -1,41 +1,42 @@ PORTNAME= bruteblock -PORTVERSION= 0.0.5 -PORTREVISION= 11 +PORTVERSION= 0.0.6 +DISTVERSIONPREFIX= v CATEGORIES= security -MASTER_SITES= https://samm.kiev.ua/bruteblock/ -MAINTAINER= amdmi3@FreeBSD.org +MAINTAINER= samm@FreeBSD.org COMMENT= Software for blocking bruteforce attacks with ipfw WWW= https://samm.kiev.ua/bruteblock/ LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/doc/LICENSE -LIB_DEPENDS= libpcre.so:devel/pcre +LIB_DEPENDS= libpcre2-8.so:devel/pcre2 SUB_FILES= pkg-message USE_RC_SUBR= bruteblockd +USE_GITHUB= yes +GH_ACCOUNT= samm-git CONFDIR= ${PREFIX}/etc/${PORTNAME} PORTDOCS= FAQ README CHANGES OPTIONS_DEFINE= DOCS do-install: ${INSTALL_PROGRAM} ${WRKSRC}/bruteblock ${STAGEDIR}${PREFIX}/sbin/ ${INSTALL_PROGRAM} ${WRKSRC}/bruteblockd ${STAGEDIR}${PREFIX}/sbin/ @${MKDIR} ${STAGEDIR}${CONFDIR} .for file in ssh proftpd ${INSTALL_DATA} ${WRKSRC}/etc/${file}.conf ${STAGEDIR}${CONFDIR}/${file}.conf.sample .endfor ${INSTALL_MAN} ${WRKSRC}/doc/bruteblock.8 ${STAGEDIR}${PREFIX}/share/man/man8/ do-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} .for file in ${PORTDOCS} ${INSTALL_DATA} ${WRKSRC}/doc/${file} ${STAGEDIR}${DOCSDIR}/ .endfor .include diff --git a/security/bruteblock/distinfo b/security/bruteblock/distinfo index ef5276f8b8bc..a1208e109fa1 100644 --- a/security/bruteblock/distinfo +++ b/security/bruteblock/distinfo @@ -1,2 +1,3 @@ -SHA256 (bruteblock-0.0.5.tar.gz) = 7c7ef533b27be1d72e43a7fa6828896124a4f22808f2a0ecca2e587e1563e253 -SIZE (bruteblock-0.0.5.tar.gz) = 24971 +TIMESTAMP = 1731881673 +SHA256 (samm-git-bruteblock-v0.0.6_GH0.tar.gz) = f13df4444c9686ff109e1fadaa62e95608630c0284e57bcad27f0528e3bcf51a +SIZE (samm-git-bruteblock-v0.0.6_GH0.tar.gz) = 24665 diff --git a/security/bruteblock/files/patch-Makefile b/security/bruteblock/files/patch-Makefile deleted file mode 100644 index 0cfbff38c566..000000000000 --- a/security/bruteblock/files/patch-Makefile +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.orig 2006-08-20 10:22:37.000000000 +0400 -+++ Makefile 2009-03-24 22:12:58.000000000 +0300 -@@ -18,7 +18,7 @@ - bruteblock: $(BRUTEBLOCK_OBJS) iniparse/libiniparser.a - $(CC) $(LDFLAGS) -o $@ $(BRUTEBLOCK_OBJS) $(EXTRA_LIBS) - --bruteblockd: $(BRUTEBLOCKD_OBJS) pidfile.h -+bruteblockd: $(BRUTEBLOCKD_OBJS) iniparse/libiniparser.a pidfile.h - $(CC) $(LDFLAGS) -o $@ $(BRUTEBLOCKD_OBJS) $(EXTRA_LIBS) - - clean: diff --git a/security/bruteblock/files/patch-bruteblock.c b/security/bruteblock/files/patch-bruteblock.c deleted file mode 100644 index a8574896cb09..000000000000 --- a/security/bruteblock/files/patch-bruteblock.c +++ /dev/null @@ -1,12 +0,0 @@ ---- bruteblock.c.orig 2006-08-20 08:22:37.000000000 +0200 -+++ bruteblock.c 2014-10-15 16:19:19.000000000 +0200 -@@ -99,7 +99,7 @@ - snprintf(table, sizeof(table), "%d", ipfw2_table_no); - argv[1] = table; - argv[2] = command; -- snprintf(utime, sizeof(utime), "%d", -- time(NULL) + reset_ip); -+ snprintf(utime, sizeof(utime), "%lld", -+ (long long)(time(NULL) + reset_ip)); - argv[4] = utime; - argv[3] = host; diff --git a/security/bruteblock/files/patch-etc-ssh.conf b/security/bruteblock/files/patch-etc-ssh.conf deleted file mode 100644 index a701b837afb8..000000000000 --- a/security/bruteblock/files/patch-etc-ssh.conf +++ /dev/null @@ -1,22 +0,0 @@ ---- etc/ssh.conf.orig 2006-08-20 10:22:37.000000000 +0400 -+++ etc/ssh.conf 2009-10-14 03:46:53.000000000 +0400 -@@ -14,8 +14,17 @@ - # comment: correct user, but wrong password - #sshd[72626]: Failed password for samm from 1.2.3.4 - # --regexp = sshd.*Illegal user \S+ from (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) --regexp1 = sshd.*Failed password for (?:illegal user )?\S+ from (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) -+# comment: other messages -+#sshd[41945]: error: PAM: authentication error for alice from 192.168.0.1 -+#sshd[41945]: error: PAM: authentication error for illegal user root from 192.168.0.1 -+#sshd[41945]: Failed keyboard-interactive/pam for invalid user root from 192.168.0.1 port 64507 ssh2 -+#sshd[16666]: Failed unknown for illegal user asdfasdfasd from 192.168.0.1 port 52652 ssh2 -+#sshd[16666]: Did not receive identification string from 192.168.0.1 -+# -+regexp = sshd.*(?:Illegal|Invalid) user \S+ from (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) -+regexp1 = sshd.*Failed \S+ for (?:(?:illegal|invalid) user )?\S+ from (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) -+regexp2 = sshd.*error: PAM: authentication error for (?:(?:illegal|invalid) user )?\S+ from (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) -+regexp3 = sshd.*Did not receive identification string from (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) - - # Number of failed login attempts within time before we block - max_count = 4