From 078b533dd4a9d30e34427fab86a493af72b3a300 Mon Sep 17 00:00:00 2001 From: ngie Date: Sat, 7 Jan 2017 08:08:35 +0000 Subject: [PATCH] Conditionalize building libwrap support into sshd Only build libwrap support into sshd if MK_TCP_WRAPPERS != no This will unbreak the build if libwrap has been removed from the system MFC after: 2 weeks PR: 210141 Submitted by: kpect@protonmail.com Differential Revision: D9049 --- crypto/openssh/config.h | 2 +- secure/usr.sbin/sshd/Makefile | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/crypto/openssh/config.h b/crypto/openssh/config.h index 364ebe33e2ef..ca1ce8e3852d 100644 --- a/crypto/openssh/config.h +++ b/crypto/openssh/config.h @@ -1408,7 +1408,7 @@ /* #undef LASTLOG_WRITE_PUTUTXLINE */ /* Define if you want TCP Wrappers support */ -#define LIBWRAP 1 +/* #undef LIBWRAP */ /* Define to whatever link() returns for "not supported" if it doesn't return EOPNOTSUPP. */ diff --git a/secure/usr.sbin/sshd/Makefile b/secure/usr.sbin/sshd/Makefile index a3c645494a3a..5fb1e23a2a40 100644 --- a/secure/usr.sbin/sshd/Makefile +++ b/secure/usr.sbin/sshd/Makefile @@ -27,7 +27,7 @@ CFLAGS+=-I${SSHDIR} -include ssh_namespace.h SRCS+= ssh_namespace.h # pam should always happen before ssh here for static linking -LIBADD= pam ssh util wrap +LIBADD= pam ssh util .if ${MK_LDNS} != "no" CFLAGS+= -DHAVE_LDNS=1 @@ -53,6 +53,11 @@ SRCS+= krb5_config.h LIBADD+= gssapi_krb5 gssapi krb5 .endif +.if ${MK_TCP_WRAPPERS} != "no" +CFLAGS+= -DLIBWRAP +LIBADD+= wrap +.endif + LIBADD+= crypto .if defined(LOCALBASE)