diff options
author | Stefan Eßer <se@FreeBSD.org> | 2020-10-27 11:29:11 +0000 |
---|---|---|
committer | Stefan Eßer <se@FreeBSD.org> | 2020-10-27 11:29:11 +0000 |
commit | 1f474190fc280d4a4ef0c214e4d7fff0d1237e22 (patch) | |
tree | 123ca2f0a46ad9a1203a6b3c7a7a38c2a50854e6 /secure | |
parent | 7b39bef2cf93f6f0e79cc55a8ee2d339e42a6816 (diff) | |
download | src-test2-1f474190fc280d4a4ef0c214e4d7fff0d1237e22.tar.gz src-test2-1f474190fc280d4a4ef0c214e4d7fff0d1237e22.zip |
Replace literal uses of /usr/local in C sources with _PATH_LOCALBASE
Literal references to /usr/local exist in a large number of files in
the FreeBSD base system. Many are in contributed software, in configuration
files, or in the documentation, but 19 uses have been identified in C
source files or headers outside the contrib and sys/contrib directories.
This commit makes it possible to set _PATH_LOCALBASE in paths.h to use
a different prefix for locally installed software.
In order to avoid changes to openssh source files, LOCALBASE is passed to
the build via Makefiles under src/secure. While _PATH_LOCALBASE could have
been used here, there is precedent in the construction of the path used to
a xauth program which depends on the LOCALBASE value passed on the compiler
command line to select a non-default directory.
This could be changed in a later commit to make the openssh build
consistently use _PATH_LOCALBASE. It is considered out-of-scope for this
commit.
Reviewed by: imp
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D26942
Notes
Notes:
svn path=/head/; revision=367075
Diffstat (limited to 'secure')
-rw-r--r-- | secure/lib/libssh/Makefile | 4 | ||||
-rw-r--r-- | secure/usr.bin/ssh-agent/Makefile | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/secure/lib/libssh/Makefile b/secure/lib/libssh/Makefile index b325fe9d32d4..aa3dc27fb526 100644 --- a/secure/lib/libssh/Makefile +++ b/secure/lib/libssh/Makefile @@ -53,6 +53,10 @@ CFLAGS+= -include krb5_config.h SRCS+= krb5_config.h .endif +.if defined(LOCALBASE) +CFLAGS+= -D_PATH_SSH_ASKPASS_DEFAULT='"${LOCALBASE}/bin/ssh-askpass"' +.endif + NO_LINT= LIBADD+= crypto crypt z diff --git a/secure/usr.bin/ssh-agent/Makefile b/secure/usr.bin/ssh-agent/Makefile index 50eafa6ba621..95ccd05811fe 100644 --- a/secure/usr.bin/ssh-agent/Makefile +++ b/secure/usr.bin/ssh-agent/Makefile @@ -16,6 +16,10 @@ CFLAGS+= -DHAVE_LDNS=1 #LDADD+= -lldns .endif +.if defined(LOCALBASE) +CFLAGS+= -DDEFAULT_PKCS11_WHITELIST='"/usr/lib*/*,${LOCALBASE}/lib*/*"' +.endif + LIBADD+= crypto .include <bsd.prog.mk> |