summaryrefslogtreecommitdiff
path: root/secure
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2025-02-09 15:37:24 -0500
committerEd Maste <emaste@FreeBSD.org>2025-02-10 11:22:42 -0500
commita63701848fe5462c4e8bbff0131bb42979e603ec (patch)
tree785871083f4603d4dae8c914c5b30653f6264a88 /secure
parent0fd31cf690328558b8a12ff65397438efc345932 (diff)
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
Diffstat (limited to 'secure')
-rw-r--r--secure/ssh.mk2
-rw-r--r--secure/usr.bin/ssh/Makefile4
-rw-r--r--secure/usr.sbin/sshd/Makefile3
3 files changed, 2 insertions, 7 deletions
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>