summaryrefslogtreecommitdiff
path: root/diff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2020-06-15 13:44:37 +0000
committerEd Maste <emaste@FreeBSD.org>2020-06-15 13:44:37 +0000
commite6a066ac3e8fdf1fcd4f3f2ca1b82bd55eb2da2a (patch)
treed6a99e0065ab5d39b716a0d5272ef21055745e0c /diff
parent6fa63e1816f543db1c68320f442e30f95d8f9f78 (diff)
Notes
Diffstat (limited to 'diff')
-rw-r--r--diff/ftpd.diff12
-rw-r--r--diff/named.diff12
-rw-r--r--diff/postfix.diff82
-rw-r--r--diff/proftpd.diff18
-rw-r--r--diff/ssh.diff14
5 files changed, 110 insertions, 28 deletions
diff --git a/diff/ftpd.diff b/diff/ftpd.diff
index d28577f3ef5f7..37b43dae22957 100644
--- a/diff/ftpd.diff
+++ b/diff/ftpd.diff
@@ -2,17 +2,17 @@
+++ pfilter.c 2015-01-23 17:12:02.000000000 -0500
@@ -0,0 +1,24 @@
+#include <stdio.h>
-+#include <blacklist.h>
++#include <blocklist.h>
+
+#include "pfilter.h"
+
-+static struct blacklist *blstate;
++static struct blocklist *blstate;
+
+void
+pfilter_open(void)
+{
+ if (blstate == NULL)
-+ blstate = blacklist_open();
++ blstate = blocklist_open();
+}
+
+void
@@ -23,7 +23,7 @@
+ if (blstate == NULL)
+ return;
+
-+ blacklist_r(blstate, what, 0, msg);
++ blocklist_r(blstate, what, 0, msg);
+}
--- /dev/null 2015-01-23 17:30:40.000000000 -0500
+++ pfilter.h 2015-01-23 17:07:25.000000000 -0500
@@ -42,8 +42,8 @@ diff -u -p -u -r1.63 Makefile
MLINKS= ftpusers.5 ftpchroot.5
+SRCS+= pfilter.c
-+LDADD+= -lblacklist
-+DPADD+= ${LIBBLACKLIST}
++LDADD+= -lblocklist
++DPADD+= ${LIBBLOCKLIST}
+
.if defined(NO_INTERNAL_LS)
CPPFLAGS+=-DNO_INTERNAL_LS
diff --git a/diff/named.diff b/diff/named.diff
index fcd97ba7ec1f4..a5069ff94df7e 100644
--- a/diff/named.diff
+++ b/diff/named.diff
@@ -8,17 +8,17 @@
+#include <named/types.h>
+#include <named/client.h>
+
-+#include <blacklist.h>
++#include <blocklist.h>
+
+#include "pfilter.h"
+
-+static struct blacklist *blstate;
++static struct blocklist *blstate;
+
+void
+pfilter_open(void)
+{
+ if (blstate == NULL)
-+ blstate = blacklist_open();
++ blstate = blocklist_open();
+}
+
+#define TCP_CLIENT(c) (((c)->attributes & NS_CLIENTATTR_TCP) != 0)
@@ -39,7 +39,7 @@
+ }
+ if (socket == NULL)
+ return;
-+ blacklist_sa_r(blstate,
++ blocklist_sa_r(blstate,
+ res != ISC_R_SUCCESS, isc_socket_getfd(socket),
+ &client->peeraddr.type.sa, client->peeraddr.length, msg);
+}
@@ -63,8 +63,8 @@ diff -u -u -r1.8 Makefile
+ pfilter.c tkeyconf.c tsigconf.c \
update.c xfrout.c zoneconf.c ${SRCS_UNIX}
-+LDADD+=-lblacklist
-+DPADD+=${LIBBLACKLIST}
++LDADD+=-lblocklist
++DPADD+=${LIBBLOCKLIST}
.include <bsd.prog.mk>
Index: dist/bin/named/client.c
===================================================================
diff --git a/diff/postfix.diff b/diff/postfix.diff
new file mode 100644
index 0000000000000..6d88e714c5059
--- /dev/null
+++ b/diff/postfix.diff
@@ -0,0 +1,82 @@
+Index: dist/src/smtpd/pfilter.c
+===================================================================
+RCS file: dist/src/smtpd/pfilter.c
+diff -N dist/src/smtpd/pfilter.c
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ dist/src/smtpd/pfilter.c 1 Feb 2018 03:29:09 -0000
+@@ -0,0 +1,19 @@
++#include "pfilter.h"
++#include <stdio.h> /* for NULL */
++#include <blocklist.h>
++
++static struct blocklist *blstate;
++
++void
++pfilter_notify(int a, int fd)
++{
++ if (blstate == NULL)
++ blstate = blocklist_open();
++ if (blstate == NULL)
++ return;
++ (void)blocklist_r(blstate, a, fd, "smtpd");
++ if (a == 0) {
++ blocklist_close(blstate);
++ blstate = NULL;
++ }
++}
+Index: dist/src/smtpd/pfilter.h
+===================================================================
+RCS file: dist/src/smtpd/pfilter.h
+diff -N dist/src/smtpd/pfilter.h
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ dist/src/smtpd/pfilter.h 1 Feb 2018 03:29:09 -0000
+@@ -0,0 +1,2 @@
++
++void pfilter_notify(int, int);
+Index: dist/src/smtpd/smtpd.c
+===================================================================
+RCS file: /cvsroot/src/external/ibm-public/postfix/dist/src/smtpd/smtpd.c,v
+retrieving revision 1.14
+diff -u -r1.14 smtpd.c
+--- dist/src/smtpd/smtpd.c 14 Feb 2017 01:16:48 -0000 1.14
++++ dist/src/smtpd/smtpd.c 1 Feb 2018 03:29:09 -0000
+@@ -1197,6 +1197,8 @@
+ #include <smtpd_milter.h>
+ #include <smtpd_expand.h>
+
++#include "pfilter.h"
++
+ /*
+ * Tunable parameters. Make sure that there is some bound on the length of
+ * an SMTP command, so that the mail system stays in control even when a
+@@ -5048,6 +5050,7 @@
+ if (state->error_count >= var_smtpd_hard_erlim) {
+ state->reason = REASON_ERROR_LIMIT;
+ state->error_mask |= MAIL_ERROR_PROTOCOL;
++ pfilter_notify(1, vstream_fileno(state->client));
+ smtpd_chat_reply(state, "421 4.7.0 %s Error: too many errors",
+ var_myhostname);
+ break;
+Index: libexec/smtpd/Makefile
+===================================================================
+RCS file: /cvsroot/src/external/ibm-public/postfix/libexec/smtpd/Makefile,v
+retrieving revision 1.6
+diff -u -r1.6 Makefile
+--- libexec/smtpd/Makefile 21 May 2017 15:28:40 -0000 1.6
++++ libexec/smtpd/Makefile 1 Feb 2018 03:29:09 -0000
+@@ -13,11 +13,14 @@
+ SRCS= smtpd.c smtpd_token.c smtpd_check.c smtpd_chat.c smtpd_state.c \
+ smtpd_peer.c smtpd_sasl_proto.c smtpd_sasl_glue.c smtpd_proxy.c \
+ smtpd_xforward.c smtpd_dsn_fix.c smtpd_milter.c smtpd_resolve.c \
+- smtpd_expand.c smtpd_haproxy.c
++ smtpd_expand.c smtpd_haproxy.c pfilter.c
+
+ DPADD+= ${LIBPMASTER} ${LIBPMILTER} ${LIBPGLOBAL} ${LIBPDNS} ${LIBPXSASL}
+ LDADD+= ${LIBPMASTER} ${LIBPMILTER} ${LIBPGLOBAL} ${LIBPDNS} ${LIBPXSASL}
+
++DPADD+= ${LIBBLOCKLIST}
++LDADD+= -lblocklist
++
+ DPADD+= ${LIBPTLS} ${LIBSSL} ${LIBCRYPTO}
+ LDADD+= ${LIBPTLS} -lssl -lcrypto
+
diff --git a/diff/proftpd.diff b/diff/proftpd.diff
index c811c9cf50bce..e8d2cc5e9e07d 100644
--- a/diff/proftpd.diff
+++ b/diff/proftpd.diff
@@ -5,8 +5,8 @@
FTPWHO_OBJS=ftpwho.o scoreboard.o misc.o
BUILD_FTPWHO_OBJS=utils/ftpwho.o utils/scoreboard.o utils/misc.o
+
-+CPPFLAGS+=-DHAVE_BLACKLIST
-+LIBS+=-lblacklist
++CPPFLAGS+=-DHAVE_BLOCKLIST
++LIBS+=-lblocklist
+OBJS+= pfilter.o
+BUILD_OBJS+= src/pfilter.o
--- /dev/null 2016-01-22 17:30:55.000000000 -0500
@@ -84,25 +84,25 @@
+#include "pfilter.h"
+#include "conf.h"
+#include "privs.h"
-+#ifdef HAVE_BLACKLIST
-+#include <blacklist.h>
++#ifdef HAVE_BLOCKLIST
++#include <blocklist.h>
+#endif
+
-+static struct blacklist *blstate;
++static struct blocklist *blstate;
+
+void
+pfilter_init(void)
+{
-+#ifdef HAVE_BLACKLIST
++#ifdef HAVE_BLOCKLIST
+ if (blstate == NULL)
-+ blstate = blacklist_open();
++ blstate = blocklist_open();
+#endif
+}
+
+void
+pfilter_notify(int a)
+{
-+#ifdef HAVE_BLACKLIST
++#ifdef HAVE_BLOCKLIST
+ conn_t *c = session.c;
+ int fd;
+
@@ -119,6 +119,6 @@
+ pfilter_init();
+ if (blstate == NULL)
+ return;
-+ (void)blacklist_r(blstate, a, fd, "proftpd");
++ (void)blocklist_r(blstate, a, fd, "proftpd");
+#endif
+}
diff --git a/diff/ssh.diff b/diff/ssh.diff
index 9427fc8ddb369..17300bb5dc8d4 100644
--- a/diff/ssh.diff
+++ b/diff/ssh.diff
@@ -7,14 +7,14 @@
+#include "packet.h"
+#include "log.h"
+#include "pfilter.h"
-+#include <blacklist.h>
++#include <blocklist.h>
+
-+static struct blacklist *blstate;
++static struct blocklist *blstate;
+
+void
+pfilter_init(void)
+{
-+ blstate = blacklist_open();
++ blstate = blocklist_open();
+}
+
+void
@@ -27,9 +27,9 @@
+ return;
+ // XXX: 3?
+ fd = packet_connection_is_on_socket() ? packet_get_connection_in() : 3;
-+ (void)blacklist_r(blstate, a, fd, "ssh");
++ (void)blocklist_r(blstate, a, fd, "ssh");
+ if (a == 0) {
-+ blacklist_close(blstate);
++ blocklist_close(blstate);
+ blstate = NULL;
+ }
+}
@@ -60,8 +60,8 @@ diff -u -u -r1.10 Makefile
LDADD+= -lwrap
DPADD+= ${LIBWRAP}
+
-+LDADD+= -lblacklist
-+DPADD+= ${LIBBLACKLIST}
++LDADD+= -lblocklist
++DPADD+= ${LIBBLOCKLIST}
diff -ru openssh-7.7p1/auth-pam.c dist/auth-pam.c
--- openssh-7.7p1/auth-pam.c 2018-04-02 01:38:28.000000000 -0400
+++ dist/auth-pam.c 2018-05-23 11:56:22.206661484 -0400