Skip to main content

Module elevate

Module elevate 

Source
Expand description

Privilege elevation support for tracexec.

When --elevate is used, tracexec captures the current user’s credentials, creates a private abstract Unix domain socket, and spawns sudo tracexec. The elevated child requests the complete original environment over that socket. The unelevated parent verifies the child’s Unix socket credentials before sending anything, then waits for the elevated child to exit. The elevated tracexec process may only consult an allowlisted subset for its own behavior, while the tracee is spawned with the complete original environment.

Structs§

PreElevationCreds
Saved credentials from before privilege elevation.

Statics§

RESTORED_ENV_ALLOWLIST
Environment variables elevated tracexec may consult after --elevate.

Functions§

elevate_and_reexec
Re-execute tracexec with elevated privileges via sudo.
env_value
env_var_os
env_var_string
filter_allowlisted_env
filter_allowlisted_env_from
request_env_from_parent
Request the complete original environment from the unelevated parent.

Type Aliases§

EnvVars