summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorse <se@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>2020-10-27 11:29:11 +0000
committerse <se@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>2020-10-27 11:29:11 +0000
commit214bee7943fc8ad7dba3671518e4352622edc08b (patch)
tree123ca2f0a46ad9a1203a6b3c7a7a38c2a50854e6 /crypto
parent10f5d711bbfbc410eab49be90476f188c92ac322 (diff)
downloadfreebsd-214bee7943fc8ad7dba3671518e4352622edc08b.tar.gz
freebsd-214bee7943fc8ad7dba3671518e4352622edc08b.tar.bz2
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 git-svn-id: http://svn.freebsd.org/base/head@367075 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Diffstat (limited to 'crypto')
-rw-r--r--crypto/openssh/regress/unittests/sshkey/test_sshkey.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/openssh/regress/unittests/sshkey/test_sshkey.c b/crypto/openssh/regress/unittests/sshkey/test_sshkey.c
index 47a03fad4fd..3415ed68196 100644
--- a/crypto/openssh/regress/unittests/sshkey/test_sshkey.c
+++ b/crypto/openssh/regress/unittests/sshkey/test_sshkey.c
@@ -9,6 +9,7 @@
#include <sys/types.h>
#include <sys/param.h>
+#include <paths.h>
#include <stdio.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
@@ -79,7 +80,7 @@ build_cert(struct sshbuf *b, const struct sshkey *k, const char *type,
critopts = sshbuf_new();
ASSERT_PTR_NE(critopts, NULL);
- put_opt(critopts, "force-command", "/usr/local/bin/nethack");
+ put_opt(critopts, "force-command", _PATH_LOCALBASE "/bin/nethack");
put_opt(critopts, "source-address", "192.168.0.0/24,127.0.0.1,::1");
exts = sshbuf_new();