The branch main has been updated by emaste:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=a63701848fe5462c4e8bbff0131bb42979e603ec

commit a63701848fe5462c4e8bbff0131bb42979e603ec
Author:     Ed Maste <ema...@freebsd.org>
AuthorDate: 2025-02-09 20:37:24 +0000
Commit:     Ed Maste <ema...@freebsd.org>
CommitDate: 2025-02-10 16:22:42 +0000

    ssh: Move XAUTH_PATH setting to ssh.mk
    
    XAUTH_PATH is normally set (in the upstream build infrastructure) in
    config.h.  We previously set it in ssh and sshd's Makefiles if LOCALBASE
    is set, and over time have sometimes also defined it in config.h.
    
    Leave it unset in config.h and move the CFLAGS logic to to ssh.mk so
    that it will be set when building all ssh libraries and programs but
    still be set by LOCALBASE.
    
    Reviewed by:    jlduran
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D48907
---
 crypto/openssh/config.h       | 2 +-
 secure/ssh.mk                 | 2 ++
 secure/usr.bin/ssh/Makefile   | 4 ----
 secure/usr.sbin/sshd/Makefile | 3 ---
 4 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/crypto/openssh/config.h b/crypto/openssh/config.h
index 6462ff16d8d9..aedacd88df10 100644
--- a/crypto/openssh/config.h
+++ b/crypto/openssh/config.h
@@ -2015,7 +2015,7 @@
 #endif
 
 /* Define if xauth is found in your path */
-#define XAUTH_PATH "/usr/local/bin/xauth"
+/* #undef XAUTH_PATH */
 
 /* Number of bits in a file offset, on hosts where this is settable. */
 /* #undef _FILE_OFFSET_BITS */
diff --git a/secure/ssh.mk b/secure/ssh.mk
index 9ee533c10eca..c331e40c16f8 100644
--- a/secure/ssh.mk
+++ b/secure/ssh.mk
@@ -7,6 +7,8 @@ SSHDIR=         ${SRCTOP}/crypto/openssh
 CFLAGS+= -I${SSHDIR} -include ssh_namespace.h
 SRCS+=  ssh_namespace.h
 
+CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE:U/usr/local}/bin/xauth\"
+
 .if ${MK_USB} != "no"
 # Built-in security key support
 CFLAGS+= -include sk_config.h
diff --git a/secure/usr.bin/ssh/Makefile b/secure/usr.bin/ssh/Makefile
index 7c3eb68ea083..9bff63f29395 100644
--- a/secure/usr.bin/ssh/Makefile
+++ b/secure/usr.bin/ssh/Makefile
@@ -29,10 +29,6 @@ LIBADD+=     gssapi
 
 LIBADD+=       crypto
 
-.if defined(LOCALBASE)
-CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\"
-.endif
-
 .include <bsd.prog.mk>
 
 .PATH: ${SSHDIR}
diff --git a/secure/usr.sbin/sshd/Makefile b/secure/usr.sbin/sshd/Makefile
index 323fe4b8c99f..2762d4151009 100644
--- a/secure/usr.sbin/sshd/Makefile
+++ b/secure/usr.sbin/sshd/Makefile
@@ -62,9 +62,6 @@ LIBADD+=      wrap
 
 LIBADD+=       crypto
 
-.if defined(LOCALBASE)
-CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\"
-.endif
 
 .include <bsd.prog.mk>
 

Reply via email to