summaryrefslogtreecommitdiffstats
path: root/secure/usr.sbin/sshd
diff options
context:
space:
mode:
authorlidl <lidl@FreeBSD.org>2016-09-06 14:52:14 +0000
committerlidl <lidl@FreeBSD.org>2016-09-06 14:52:14 +0000
commit3b9c774076145fbda20cc62b99547f3deb4f52d3 (patch)
tree3aab3829188eccde1796fccf737fbcc22a82ab6b /secure/usr.sbin/sshd
parente16037a886066569c7c5ecb3c5ff0d9b7243b651 (diff)
downloadFreeBSD-src-3b9c774076145fbda20cc62b99547f3deb4f52d3.zip
FreeBSD-src-3b9c774076145fbda20cc62b99547f3deb4f52d3.tar.gz
MFC r305065: Add refactored blacklist support to sshd
Change the calls to of blacklist_init() and blacklist_notify to be macros defined in the blacklist_client.h file. This avoids the need for #ifdef USE_BLACKLIST / #endif except in the blacklist.c file. Remove redundent initialization attempts from within blacklist_notify - everything always goes through blacklistd_init(). Added UseBlacklist option to sshd, which defaults to off. To enable the functionality, use '-o UseBlacklist=yes' on the command line, or uncomment in the sshd_config file. Approved by: des Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'secure/usr.sbin/sshd')
-rw-r--r--secure/usr.sbin/sshd/Makefile7
-rw-r--r--secure/usr.sbin/sshd/Makefile.depend1
2 files changed, 8 insertions, 0 deletions
diff --git a/secure/usr.sbin/sshd/Makefile b/secure/usr.sbin/sshd/Makefile
index f9589a3..af76099 100644
--- a/secure/usr.sbin/sshd/Makefile
+++ b/secure/usr.sbin/sshd/Makefile
@@ -40,6 +40,13 @@ CFLAGS+= -DUSE_BSM_AUDIT -DHAVE_GETAUDIT_ADDR
LIBADD+= bsm
.endif
+.if ${MK_BLACKLIST_SUPPORT} != "no"
+CFLAGS+= -DUSE_BLACKLIST -I${SRCTOP}/contrib/blacklist/include
+SRCS+= blacklist.c
+LIBADD+= blacklist
+LDFLAGS+=-L${LIBBLACKLISTDIR}
+.endif
+
.if ${MK_KERBEROS_SUPPORT} != "no"
CFLAGS+= -include krb5_config.h
SRCS+= krb5_config.h
diff --git a/secure/usr.sbin/sshd/Makefile.depend b/secure/usr.sbin/sshd/Makefile.depend
index d24b0be..220aae3 100644
--- a/secure/usr.sbin/sshd/Makefile.depend
+++ b/secure/usr.sbin/sshd/Makefile.depend
@@ -17,6 +17,7 @@ DIRDEPS = \
kerberos5/lib/libroken \
kerberos5/lib/libwind \
lib/${CSU_DIR} \
+ lib/libblacklist \
lib/libbsm \
lib/libc \
lib/libcom_err \
OpenPOWER on IntegriCloud