]> git.cameronkatri.com Git - pw-darwin.git/commit
Add function getlocalbase() to libutil.
authorStefan Eßer <se@FreeBSD.org>
Wed, 18 Nov 2020 19:44:30 +0000 (19:44 +0000)
committerStefan Eßer <se@FreeBSD.org>
Wed, 18 Nov 2020 19:44:30 +0000 (19:44 +0000)
commitbbdcdb5b3bd8e0042347afa0c0575b928fceb9d4
treeb0bed7ecefb0adb70c9d2737670ef44a4c592c60
parentfcf4b2f12ab5618542cc036a40239eedd658f95a
Add function getlocalbase() to libutil.

This function returns the path to the local software base directory, by
default "/usr/local" (or the value of _PATH_LOCALBASE in include/paths.h
when building the world).

The value returned can be overridden by 2 methods:

- the LOCALBASE environment variable (ignored by SUID programs)
- else a non-default user.localbase sysctl value

Reviewed by: hps (earlier version)
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D27236
libutil/libutil.h