Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Feb 2025 18:46:09 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 6cb9cfffa89a - releng/13.5 - ssh: Move XAUTH_PATH setting to ssh.mk
Message-ID:  <202502201846.51KIk9YC062022@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch releng/13.5 has been updated by emaste:

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

commit 6cb9cfffa89a1f2faf5a7fa3dd29f4e54e79c6fb
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2025-02-09 20:37:24 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-02-20 18:44:55 +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
    
    (cherry picked from commit a63701848fe5462c4e8bbff0131bb42979e603ec)
    (cherry picked from commit 73dd56ffcd7b2c46de58980ac888c0421e3ec0b6)
    (cherry picked from commit 10e9add50f9358b6b74e1d481b270ba32f3e85da)
    
    Approved by:    re (cperciva)
---
 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 78bd4280818a..e36d766039df 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 1d1f5e5e8723..f5560acb8799 100644
--- a/secure/usr.bin/ssh/Makefile
+++ b/secure/usr.bin/ssh/Makefile
@@ -30,10 +30,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 fd9eacebe68d..73aedb25a84b 100644
--- a/secure/usr.sbin/sshd/Makefile
+++ b/secure/usr.sbin/sshd/Makefile
@@ -63,9 +63,6 @@ LIBADD+=	wrap
 
 LIBADD+=	crypto
 
-.if defined(LOCALBASE)
-CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\"
-.endif
 
 .include <bsd.prog.mk>
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502201846.51KIk9YC062022>