missed the capitalized ones.
This commit is contained in:
parent
2f0bfbf344
commit
a51582d48a
|
@ -1,9 +1,9 @@
|
||||||
# $NetBSD: Makefile.inc,v 1.1.1.1 2020/06/15 01:52:52 christos Exp $
|
# $NetBSD: Makefile.inc,v 1.2 2020/06/15 02:29:44 christos Exp $
|
||||||
|
|
||||||
WARNS=6
|
WARNS=6
|
||||||
.if !defined(LIB)
|
.if !defined(LIB)
|
||||||
LDADD+= -lblocklist
|
LDADD+= -lblocklist
|
||||||
DPADD+= ${LIBBLACKLIST}
|
DPADD+= ${LIBBLOCKLIST}
|
||||||
.endif
|
.endif
|
||||||
CPPFLAGS+= -I${.CURDIR}/../include
|
CPPFLAGS+= -I${.CURDIR}/../include
|
||||||
CPPFLAGS+=-DHAVE_STRUCT_SOCKADDR_SA_LEN -DHAVE_UTIL_H -DHAVE_DB_H
|
CPPFLAGS+=-DHAVE_STRUCT_SOCKADDR_SA_LEN -DHAVE_UTIL_H -DHAVE_DB_H
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.\" $NetBSD: blocklistctl.8,v 1.1.1.1 2020/06/15 01:52:52 christos Exp $
|
.\" $NetBSD: blocklistctl.8,v 1.2 2020/06/15 02:29:44 christos Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 2015 The NetBSD Foundation, Inc.
|
.\" Copyright (c) 2015 The NetBSD Foundation, Inc.
|
||||||
.\" All rights reserved.
|
.\" All rights reserved.
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
.\" POSSIBILITY OF SUCH DAMAGE.
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.Dd June 7, 2016
|
.Dd June 7, 2016
|
||||||
.Dt BLACKLISTCTL 8
|
.Dt BLOCKLISTCTL 8
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
.Nm blocklistctl
|
.Nm blocklistctl
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.\" $NetBSD: blocklistd.8,v 1.1.1.1 2020/06/15 01:52:53 christos Exp $
|
.\" $NetBSD: blocklistd.8,v 1.2 2020/06/15 02:29:44 christos Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 2015 The NetBSD Foundation, Inc.
|
.\" Copyright (c) 2015 The NetBSD Foundation, Inc.
|
||||||
.\" All rights reserved.
|
.\" All rights reserved.
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
.\" POSSIBILITY OF SUCH DAMAGE.
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.Dd April 21, 2020
|
.Dd April 21, 2020
|
||||||
.Dt BLACKLISTD 8
|
.Dt BLOCKLISTD 8
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
.Nm blocklistd
|
.Nm blocklistd
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.\" $NetBSD: blocklistd.conf.5,v 1.1.1.1 2020/06/15 01:52:53 christos Exp $
|
.\" $NetBSD: blocklistd.conf.5,v 1.2 2020/06/15 02:29:44 christos Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 2015 The NetBSD Foundation, Inc.
|
.\" Copyright (c) 2015 The NetBSD Foundation, Inc.
|
||||||
.\" All rights reserved.
|
.\" All rights reserved.
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
.\" POSSIBILITY OF SUCH DAMAGE.
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.Dd May 18, 2020
|
.Dd May 18, 2020
|
||||||
.Dt BLACKLISTD.CONF 5
|
.Dt BLOCKLISTD.CONF 5
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
.Nm blocklistd.conf
|
.Nm blocklistd.conf
|
||||||
|
|
|
@ -43,7 +43,7 @@ diff -u -p -u -r1.63 Makefile
|
||||||
|
|
||||||
+SRCS+= pfilter.c
|
+SRCS+= pfilter.c
|
||||||
+LDADD+= -lblocklist
|
+LDADD+= -lblocklist
|
||||||
+DPADD+= ${LIBBLACKLIST}
|
+DPADD+= ${LIBBLOCKLIST}
|
||||||
+
|
+
|
||||||
.if defined(NO_INTERNAL_LS)
|
.if defined(NO_INTERNAL_LS)
|
||||||
CPPFLAGS+=-DNO_INTERNAL_LS
|
CPPFLAGS+=-DNO_INTERNAL_LS
|
||||||
|
|
|
@ -64,7 +64,7 @@ diff -u -u -r1.8 Makefile
|
||||||
update.c xfrout.c zoneconf.c ${SRCS_UNIX}
|
update.c xfrout.c zoneconf.c ${SRCS_UNIX}
|
||||||
|
|
||||||
+LDADD+=-lblocklist
|
+LDADD+=-lblocklist
|
||||||
+DPADD+=${LIBBLACKLIST}
|
+DPADD+=${LIBBLOCKLIST}
|
||||||
.include <bsd.prog.mk>
|
.include <bsd.prog.mk>
|
||||||
Index: dist/bin/named/client.c
|
Index: dist/bin/named/client.c
|
||||||
===================================================================
|
===================================================================
|
||||||
|
|
|
@ -74,7 +74,7 @@ diff -u -r1.6 Makefile
|
||||||
DPADD+= ${LIBPMASTER} ${LIBPMILTER} ${LIBPGLOBAL} ${LIBPDNS} ${LIBPXSASL}
|
DPADD+= ${LIBPMASTER} ${LIBPMILTER} ${LIBPGLOBAL} ${LIBPDNS} ${LIBPXSASL}
|
||||||
LDADD+= ${LIBPMASTER} ${LIBPMILTER} ${LIBPGLOBAL} ${LIBPDNS} ${LIBPXSASL}
|
LDADD+= ${LIBPMASTER} ${LIBPMILTER} ${LIBPGLOBAL} ${LIBPDNS} ${LIBPXSASL}
|
||||||
|
|
||||||
+DPADD+= ${LIBBLACKLIST}
|
+DPADD+= ${LIBBLOCKLIST}
|
||||||
+LDADD+= -lblocklist
|
+LDADD+= -lblocklist
|
||||||
+
|
+
|
||||||
DPADD+= ${LIBPTLS} ${LIBSSL} ${LIBCRYPTO}
|
DPADD+= ${LIBPTLS} ${LIBSSL} ${LIBCRYPTO}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
FTPWHO_OBJS=ftpwho.o scoreboard.o misc.o
|
FTPWHO_OBJS=ftpwho.o scoreboard.o misc.o
|
||||||
BUILD_FTPWHO_OBJS=utils/ftpwho.o utils/scoreboard.o utils/misc.o
|
BUILD_FTPWHO_OBJS=utils/ftpwho.o utils/scoreboard.o utils/misc.o
|
||||||
+
|
+
|
||||||
+CPPFLAGS+=-DHAVE_BLACKLIST
|
+CPPFLAGS+=-DHAVE_BLOCKLIST
|
||||||
+LIBS+=-lblocklist
|
+LIBS+=-lblocklist
|
||||||
+OBJS+= pfilter.o
|
+OBJS+= pfilter.o
|
||||||
+BUILD_OBJS+= src/pfilter.o
|
+BUILD_OBJS+= src/pfilter.o
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
+#include "pfilter.h"
|
+#include "pfilter.h"
|
||||||
+#include "conf.h"
|
+#include "conf.h"
|
||||||
+#include "privs.h"
|
+#include "privs.h"
|
||||||
+#ifdef HAVE_BLACKLIST
|
+#ifdef HAVE_BLOCKLIST
|
||||||
+#include <blocklist.h>
|
+#include <blocklist.h>
|
||||||
+#endif
|
+#endif
|
||||||
+
|
+
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
+void
|
+void
|
||||||
+pfilter_init(void)
|
+pfilter_init(void)
|
||||||
+{
|
+{
|
||||||
+#ifdef HAVE_BLACKLIST
|
+#ifdef HAVE_BLOCKLIST
|
||||||
+ if (blstate == NULL)
|
+ if (blstate == NULL)
|
||||||
+ blstate = blocklist_open();
|
+ blstate = blocklist_open();
|
||||||
+#endif
|
+#endif
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
+void
|
+void
|
||||||
+pfilter_notify(int a)
|
+pfilter_notify(int a)
|
||||||
+{
|
+{
|
||||||
+#ifdef HAVE_BLACKLIST
|
+#ifdef HAVE_BLOCKLIST
|
||||||
+ conn_t *c = session.c;
|
+ conn_t *c = session.c;
|
||||||
+ int fd;
|
+ int fd;
|
||||||
+
|
+
|
||||||
|
|
|
@ -61,7 +61,7 @@ diff -u -u -r1.10 Makefile
|
||||||
DPADD+= ${LIBWRAP}
|
DPADD+= ${LIBWRAP}
|
||||||
+
|
+
|
||||||
+LDADD+= -lblocklist
|
+LDADD+= -lblocklist
|
||||||
+DPADD+= ${LIBBLACKLIST}
|
+DPADD+= ${LIBBLOCKLIST}
|
||||||
diff -ru openssh-7.7p1/auth-pam.c dist/auth-pam.c
|
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
|
--- 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
|
+++ dist/auth-pam.c 2018-05-23 11:56:22.206661484 -0400
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: blocklist.h,v 1.1.1.1 2020/06/15 01:52:53 christos Exp $ */
|
/* $NetBSD: blocklist.h,v 1.2 2020/06/15 02:29:45 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||||
|
@ -28,8 +28,8 @@
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
#ifndef _BLACKLIST_H
|
#ifndef _BLOCKLIST_H
|
||||||
#define _BLACKLIST_H
|
#define _BLOCKLIST_H
|
||||||
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
||||||
|
@ -44,12 +44,12 @@ int blocklist_sa_r(struct blocklist *, int, int,
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
/* action values for user applications */
|
/* action values for user applications */
|
||||||
#define BLACKLIST_API_ENUM 1
|
#define BLOCKLIST_API_ENUM 1
|
||||||
enum {
|
enum {
|
||||||
BLACKLIST_AUTH_OK = 0,
|
BLOCKLIST_AUTH_OK = 0,
|
||||||
BLACKLIST_AUTH_FAIL,
|
BLOCKLIST_AUTH_FAIL,
|
||||||
BLACKLIST_ABUSIVE_BEHAVIOR,
|
BLOCKLIST_ABUSIVE_BEHAVIOR,
|
||||||
BLACKLIST_BAD_USER
|
BLOCKLIST_BAD_USER
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* _BLACKLIST_H */
|
#endif /* _BLOCKLIST_H */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: blocklist.c,v 1.1.1.1 2020/06/15 01:52:53 christos Exp $ */
|
/* $NetBSD: blocklist.c,v 1.2 2020/06/15 02:29:45 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__RCSID("$NetBSD: blocklist.c,v 1.1.1.1 2020/06/15 01:52:53 christos Exp $");
|
__RCSID("$NetBSD: blocklist.c,v 1.2 2020/06/15 02:29:45 christos Exp $");
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <bl.h>
|
#include <bl.h>
|
||||||
|
@ -65,16 +65,16 @@ blocklist_sa_r(struct blocklist *bl, int action, int rfd,
|
||||||
|
|
||||||
/* internal values are not the same as user application values */
|
/* internal values are not the same as user application values */
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case BLACKLIST_AUTH_FAIL:
|
case BLOCKLIST_AUTH_FAIL:
|
||||||
internal_action = BL_ADD;
|
internal_action = BL_ADD;
|
||||||
break;
|
break;
|
||||||
case BLACKLIST_AUTH_OK:
|
case BLOCKLIST_AUTH_OK:
|
||||||
internal_action = BL_DELETE;
|
internal_action = BL_DELETE;
|
||||||
break;
|
break;
|
||||||
case BLACKLIST_ABUSIVE_BEHAVIOR:
|
case BLOCKLIST_ABUSIVE_BEHAVIOR:
|
||||||
internal_action = BL_ABUSE;
|
internal_action = BL_ABUSE;
|
||||||
break;
|
break;
|
||||||
case BLACKLIST_BAD_USER:
|
case BLOCKLIST_BAD_USER:
|
||||||
internal_action = BL_BADUSER;
|
internal_action = BL_BADUSER;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.\" $NetBSD: libblocklist.3,v 1.1.1.1 2020/06/15 01:52:53 christos Exp $
|
.\" $NetBSD: libblocklist.3,v 1.2 2020/06/15 02:29:45 christos Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 2015 The NetBSD Foundation, Inc.
|
.\" Copyright (c) 2015 The NetBSD Foundation, Inc.
|
||||||
.\" All rights reserved.
|
.\" All rights reserved.
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
.\" POSSIBILITY OF SUCH DAMAGE.
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.Dd March 30, 2020
|
.Dd March 30, 2020
|
||||||
.Dt LIBBLACKLIST 3
|
.Dt LIBBLOCKLIST 3
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
.Nm blocklist_open ,
|
.Nm blocklist_open ,
|
||||||
|
@ -89,17 +89,17 @@ argument.
|
||||||
The
|
The
|
||||||
.Ar action
|
.Ar action
|
||||||
parameter can take these values:
|
parameter can take these values:
|
||||||
.Bl -tag -width ".Va BLACKLIST_ABUSIVE_BEHAVIOR"
|
.Bl -tag -width ".Va BLOCKLIST_ABUSIVE_BEHAVIOR"
|
||||||
.It Va BLACKLIST_AUTH_FAIL
|
.It Va BLOCKLIST_AUTH_FAIL
|
||||||
There was an unsuccessful authentication attempt.
|
There was an unsuccessful authentication attempt.
|
||||||
.It Va BLACKLIST_AUTH_OK
|
.It Va BLOCKLIST_AUTH_OK
|
||||||
A user successfully authenticated.
|
A user successfully authenticated.
|
||||||
.It Va BLACKLIST_ABUSIVE_BEHAVIOR
|
.It Va BLOCKLIST_ABUSIVE_BEHAVIOR
|
||||||
The sending daemon has detected abusive behavior
|
The sending daemon has detected abusive behavior
|
||||||
from the remote system.
|
from the remote system.
|
||||||
The remote address should
|
The remote address should
|
||||||
be blocked as soon as possible.
|
be blocked as soon as possible.
|
||||||
.It Va BLACKLIST_BAD_USER
|
.It Va BLOCKLIST_BAD_USER
|
||||||
The sending daemon has determined the username
|
The sending daemon has determined the username
|
||||||
presented for authentication is invalid.
|
presented for authentication is invalid.
|
||||||
The
|
The
|
||||||
|
@ -108,7 +108,7 @@ daemon compares the username to a configured list of forbidden
|
||||||
usernames and
|
usernames and
|
||||||
blocks the address immediately if a forbidden username matches.
|
blocks the address immediately if a forbidden username matches.
|
||||||
(The
|
(The
|
||||||
.Ar BLACKLIST_BAD_USER
|
.Ar BLOCKLIST_BAD_USER
|
||||||
support is not currently available.)
|
support is not currently available.)
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
|
|
Loading…
Reference in New Issue