Page MenuHomeFreeBSD

getlocalbase: Make default path actually configurable
ClosedPublic

Authored by jrtc27 on Jul 11 2023, 6:15 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 11, 1:28 AM
Unknown Object (File)
Aug 5 2025, 3:04 AM
Unknown Object (File)
Aug 2 2025, 4:09 AM
Unknown Object (File)
Aug 1 2025, 9:25 PM
Unknown Object (File)
Aug 1 2025, 5:53 PM
Unknown Object (File)
Jul 21 2025, 12:56 AM
Unknown Object (File)
Jul 14 2025, 12:43 PM
Unknown Object (File)
Jul 12 2025, 3:35 PM
Subscribers

Details

Summary

We include paths.h in getlocalbase.c, which defines _PATH_LOCALBASE.
This will override a definition on the command line, meaning it is
impossible to override like how the manpage says you can, and it means
the code to provide a fallback default is dead as the macro is always
defined.

Instead, introduce a new LOCALBASE_PATH macro like LOCALBASE_CTL_LEN
that can be set on the command line and will default to the system's
existing _PATH_LOCALBASE to avoid duplicating the default here.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable