git: be7b17651100 - stable/14 - ssh: tidy include handling
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 11 Mar 2025 14:39:58 UTC
The branch stable/14 has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=be7b176511003be3d47ae463fd6bea5659446c70
commit be7b176511003be3d47ae463fd6bea5659446c70
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2022-03-02 14:45:23 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-03-11 14:39:36 +0000
ssh: tidy include handling
Centralize optional krb5_config.h handling in ssh.mk. Do not add
headers (that are committed to the src tree) to SRCS as there is no
need.
Reviewed by: imp, jlduran, kevans (all earlier)
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34409
(cherry picked from commit 7f916236044d9a733de8b3c47b5dcbf71988cb03)
---
secure/lib/libssh/Makefile | 5 -----
secure/libexec/sshd-session/Makefile | 2 --
secure/ssh.mk | 5 ++++-
secure/usr.bin/ssh/Makefile | 2 --
secure/usr.sbin/sshd/Makefile | 2 --
5 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/secure/lib/libssh/Makefile b/secure/lib/libssh/Makefile
index ea09ccba8719..0a5b25e6780d 100644
--- a/secure/lib/libssh/Makefile
+++ b/secure/lib/libssh/Makefile
@@ -51,11 +51,6 @@ SRCS+= getrrsetbyname-ldns.c
LIBADD+= ldns
.endif
-.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
-CFLAGS+= -include krb5_config.h
-SRCS+= krb5_config.h
-.endif
-
.if defined(LOCALBASE)
CFLAGS+= -D_PATH_SSH_ASKPASS_DEFAULT='"${LOCALBASE}/bin/ssh-askpass"'
.endif
diff --git a/secure/libexec/sshd-session/Makefile b/secure/libexec/sshd-session/Makefile
index e365b0c53dde..bce96112f65a 100644
--- a/secure/libexec/sshd-session/Makefile
+++ b/secure/libexec/sshd-session/Makefile
@@ -45,8 +45,6 @@ LDFLAGS+=-L${LIBBLACKLISTDIR}
.endif
.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
-CFLAGS+= -include krb5_config.h
-SRCS+= krb5_config.h
LIBADD+= gssapi_krb5 gssapi krb5
.endif
diff --git a/secure/ssh.mk b/secure/ssh.mk
index c331e40c16f8..bd88e43aa0a3 100644
--- a/secure/ssh.mk
+++ b/secure/ssh.mk
@@ -5,7 +5,10 @@
SSHDIR= ${SRCTOP}/crypto/openssh
CFLAGS+= -I${SSHDIR} -include ssh_namespace.h
-SRCS+= ssh_namespace.h
+
+.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
+CFLAGS+= -include krb5_config.h
+.endif
CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE:U/usr/local}/bin/xauth\"
diff --git a/secure/usr.bin/ssh/Makefile b/secure/usr.bin/ssh/Makefile
index f5560acb8799..e16433ec5d1d 100644
--- a/secure/usr.bin/ssh/Makefile
+++ b/secure/usr.bin/ssh/Makefile
@@ -23,8 +23,6 @@ CFLAGS+= -DHAVE_LDNS=1
.endif
.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
-CFLAGS+= -include krb5_config.h
-SRCS+= krb5_config.h
LIBADD+= gssapi
.endif
diff --git a/secure/usr.sbin/sshd/Makefile b/secure/usr.sbin/sshd/Makefile
index 2a49c6ad0203..5d6dca203a0b 100644
--- a/secure/usr.sbin/sshd/Makefile
+++ b/secure/usr.sbin/sshd/Makefile
@@ -18,8 +18,6 @@ moduli: .MADE
LIBADD= ssh util
.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
-CFLAGS+= -include krb5_config.h
-SRCS+= krb5_config.h
LIBADD+= gssapi_krb5 gssapi krb5
.endif