summaryrefslogtreecommitdiff
path: root/secure
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2025-06-10 12:46:35 -0700
committerCy Schubert <cy@FreeBSD.org>2025-06-15 19:49:36 -0700
commit70371c7959df8bcba9b5ee62d976c1e74991e0a9 (patch)
treedad9b63e7823c19c0a53bd52250751a60789abe7 /secure
parentd903f2e289a7f8c502918ebc64d46aaa86efce24 (diff)
openssh: Support building with MIT KRB5
Remove HEIMDAL=1 from openssh/krb5_config.h and move the definition to the Makefile in order to control whether we're building under Heimdal or MIT. Add MIT KRB5 LIBS and INCLUDES to the openssh build. Sponsored by: The FreeBSD Foundation Reviewed by: markj Differential revision: https://reviews.freebsd.org/D50782
Diffstat (limited to 'secure')
-rw-r--r--secure/libexec/sshd-session/Makefile9
-rw-r--r--secure/ssh.mk4
2 files changed, 13 insertions, 0 deletions
diff --git a/secure/libexec/sshd-session/Makefile b/secure/libexec/sshd-session/Makefile
index e9e106fe90bd..8841cace5239 100644
--- a/secure/libexec/sshd-session/Makefile
+++ b/secure/libexec/sshd-session/Makefile
@@ -40,6 +40,15 @@ LDFLAGS+=-L${LIBBLACKLISTDIR}
.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
LIBADD+= gssapi_krb5 gssapi krb5
+.if ${MK_MITKRB5} != "no"
+.include "../../krb5/Makefile.inc"
+CFLAGS+= -I${KRB5_DIR}/include \
+ -I${KRB5_SRCTOP}/include \
+ -I${KRB5_OBJTOP}/lib \
+ -I${KRB5_DIR}/lib/gssapi/generic \
+ -I${KRB5_DIR}/lib/gssapi/krb5 \
+ -I${KRB5_DIR}/lib/gssapi/mechglue
+.endif
.endif
.if ${MK_TCP_WRAPPERS} != "no"
diff --git a/secure/ssh.mk b/secure/ssh.mk
index 84d9a7f57032..bb6dd9b748e4 100644
--- a/secure/ssh.mk
+++ b/secure/ssh.mk
@@ -11,6 +11,10 @@ CFLAGS+= -I${SSHDIR} -include ssh_namespace.h
.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
CFLAGS+= -include krb5_config.h
+.if ${MK_MITKRB5} == "no"
+CFLAGS+= -DHEIMDAL=1
+.endif
+
.endif
CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE:U/usr/local}/bin/xauth\"