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
This commit is contained in:
Ed Maste 2025-02-09 15:37:24 -05:00
parent 0fd31cf690
commit a63701848f
4 changed files with 3 additions and 8 deletions

View file

@ -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 */

View file

@ -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

View file

@ -29,10 +29,6 @@ LIBADD+= gssapi
LIBADD+= crypto
.if defined(LOCALBASE)
CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\"
.endif
.include <bsd.prog.mk>
.PATH: ${SSHDIR}

View file

@ -62,9 +62,6 @@ LIBADD+= wrap
LIBADD+= crypto
.if defined(LOCALBASE)
CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\"
.endif
.include <bsd.prog.mk>