1 --- Make.rules.in.orig 2015-05-27 20:25:54.000000000 -0400
2 +++ Make.rules.in 2016-01-25 21:48:47.000000000 -0500
5 FTPWHO_OBJS=ftpwho.o scoreboard.o misc.o
6 BUILD_FTPWHO_OBJS=utils/ftpwho.o utils/scoreboard.o utils/misc.o
8 +CPPFLAGS+=-DHAVE_BLACKLIST
11 +BUILD_OBJS+= src/pfilter.o
12 --- /dev/null 2016-01-22 17:30:55.000000000 -0500
13 +++ include/pfilter.h 2016-01-22 16:18:33.000000000 -0500
16 +void pfilter_notify(int);
17 +void pfilter_init(void);
18 --- modules/mod_auth.c.orig 2015-05-27 20:25:54.000000000 -0400
19 +++ modules/mod_auth.c 2016-01-22 16:21:06.000000000 -0500
29 _("Login timeout (%d %s): closing control connection"), TimeoutLogin,
30 TimeoutLogin != 1 ? "seconds" : "second");
34 /* It's possible that any listeners of this event might terminate the
35 * session process themselves (e.g. mod_ban). So write out that the
36 * TimeoutLogin has been exceeded to the log here, in addition to the
38 pr_memscrub(pass, strlen(pass));
42 pr_log_auth(PR_LOG_NOTICE, "SECURITY VIOLATION: Root login attempted");
51 pr_memscrub(pass, strlen(pass));
52 session.user = session.group = NULL;
53 --- src/main.c.orig 2016-01-22 17:36:43.000000000 -0500
54 +++ src/main.c 2016-01-22 17:37:58.000000000 -0500
61 int (*cmd_auth_chk)(cmd_rec *);
62 void (*cmd_handler)(server_rec *, conn_t *);
70 /* A race condition exists on heavily loaded servers where the parent
73 /* Reseed pseudo-randoms */
74 srand((unsigned int) (time(NULL) * getpid()));
78 #endif /* PR_DEVEL_NO_FORK */
80 /* Child is running here */
81 --- /dev/null 2016-01-22 17:30:55.000000000 -0500
82 +++ src/pfilter.c 2016-01-22 16:37:55.000000000 -0500
87 +#ifdef HAVE_BLACKLIST
88 +#include <blacklist.h>
91 +static struct blacklist *blstate;
96 +#ifdef HAVE_BLACKLIST
97 + if (blstate == NULL)
98 + blstate = blacklist_open();
103 +pfilter_notify(int a)
105 +#ifdef HAVE_BLACKLIST
106 + conn_t *c = session.c;
113 + else if (c->wfd != -1)
118 + if (blstate == NULL)
120 + if (blstate == NULL)
122 + (void)blacklist_r(blstate, a, fd, "proftpd");