HomeFreeBSD

rtld: rework how environment variables are named

Description

rtld: rework how environment variables are named

Instead of specifying the main name part of the environment variable as the
string literal, create array of the var names and access them by symbolic
index. Convert main name parts into complete names by prefixing with
ABI-specific ld_env_vars.

This way the name is not repeated, and also it can carry additional
proporties explicitly. For instance, cleanup of the environment for
the setuid image does not require retyping all names.

Reviewed by: arichardson, markj
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D31545

Details

Provenance
kibAuthored on Aug 15 2021, 6:57 PM
Reviewer
arichardson
Differential Revision
D31545: rtld: rework how environment variables are named
Parents
rG5469a9953005: unbound: Vendor import 1.13.2
Branches
Unknown
Tags
Unknown