gssapi,krb5: Replace libgssapi with the MIT version

lib/libgssapi is based on Heimdal. As on Linux systems, the MIT
libgssapi_krb5 replaces it. With both gssapi libraries and header files
installed results in broken buildworld (gssd) and ports that will not
build without modifications to support the MIT gssapi in an alternate
location.

73ed0c7992 removed the MIT GSSAPI headers from /usr/include. Apps using
MIT KRB5 gssapi functions and structures will fail to build without this
patch.

This patch includes a temporary patch to usr.sbin/gssd to allow it
to build with this patch. rmacklem@ has a patch for this and for
kgssapi that uses this patch to resolve kgssapi issues for NFS with
Kerberos.

This patch is an updated version of D51661 to allow it to build following
additional patchs to the tree.

This should have been implmented with 7e35117eb0.

Fixes:			7e35117eb0, 73ed0c7992
Differential Revision:	https://reviews.freebsd.org/D51661
This commit is contained in:
Cy Schubert committed 2025-08-07 10:17:00 -07:00
1 parent a245dc5d68
commit e26259f48a
18 files changed
+53 -29

No files matched your search

+4 -5
View File
@@ -39,15 +39,14 @@ LDFLAGS+=-L${LIBBLACKLISTDIR}
.endif
.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
LIBADD+= gssapi_krb5 gssapi krb5
.if ${MK_MITKRB5} != "no"
LIBADD+= gssapi_krb5 krb5
.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
-I${KRB5_OBJTOP}/lib
.else
LIBADD+= gssapi_krb5 gssapi krb5
.endif
.endif
+4
View File
@@ -18,7 +18,11 @@ SRCS+= gss-genr.c
LIBADD= ssh
.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
.if ${MK_MITKRB5} == "no"
LIBADD+= gssapi
.else
LIBADD+= gssapi_krb5
.endif
.endif
LIBADD+= crypto
+4
View File
@@ -19,7 +19,11 @@ moduli: .MADE
LIBADD= ssh util
.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
.if ${MK_MITKRB5} == "no"
LIBADD+= gssapi_krb5 gssapi krb5
.else
LIBADD+= gssapi_krb5 krb5
.endif
.endif
.if ${MK_TCP_WRAPPERS} != "no"