Documentation
¶
Overview ¶
Package lookpath resolves executables by PATH within a root directory, following symlinks confined to that root via openat2(RESOLVE_IN_ROOT).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InRoot ¶
InRoot resolves name to a path that can be exec'd after chrooting into root.
A name containing a slash is returned unchanged (treated as an explicit path). Otherwise the PATH entry from env is searched, and each candidate is resolved under root with RESOLVE_IN_ROOT: absolute symlink targets (e.g. Nix profile links pointing into /nix/store, which may live on a sub-mount of root) are interpreted relative to root, and resolution can never escape it. The returned path is the PATH-relative candidate, valid once the caller chroots into root. Returns an error if name is not found as an executable file.
Types ¶
This section is empty.