don't use blacklist if we are crunched.
This commit is contained in:
parent
3808a58b42
commit
6399d84e46
@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile,v 1.11 2015/01/25 15:52:44 christos Exp $
|
||||
# $NetBSD: Makefile,v 1.12 2015/01/26 03:57:17 christos Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
@ -69,5 +69,9 @@ DPADD+= ${LIBCRYPT} ${LIBUTIL}
|
||||
LDADD+= -lwrap
|
||||
DPADD+= ${LIBWRAP}
|
||||
|
||||
.ifdef CRUNCHEDPROG
|
||||
CPPFLAGS+=-DSMALL
|
||||
.else
|
||||
LDADD+= -lblacklist
|
||||
DPADD+= ${LIBBLACKLIST}
|
||||
.endif
|
||||
|
8
crypto/external/bsd/openssh/dist/pfilter.c
vendored
8
crypto/external/bsd/openssh/dist/pfilter.c
vendored
@ -5,17 +5,22 @@
|
||||
#include "pfilter.h"
|
||||
#include <blacklist.h>
|
||||
|
||||
#ifndef SMALL
|
||||
static struct blacklist *blstate;
|
||||
#endif
|
||||
|
||||
void
|
||||
pfilter_init()
|
||||
{
|
||||
#ifndef SMALL
|
||||
blstate = blacklist_open();
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
pfilter_notify(int a)
|
||||
{
|
||||
#ifndef SMALL
|
||||
int fd;
|
||||
if (blstate == NULL)
|
||||
pfilter_init();
|
||||
@ -24,4 +29,7 @@ pfilter_notify(int a)
|
||||
// XXX: 3?
|
||||
fd = packet_connection_is_on_socket() ? packet_get_connection_in() : 3;
|
||||
(void)blacklist_r(blstate, a, fd, "ssh");
|
||||
#else
|
||||
__USE(a);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user