subprocess-inject-env

Crates.iosubprocess-inject-env
lib.rssubprocess-inject-env
version0.1.0
sourcesrc
created_at2024-09-05 13:08:08.97438
updated_at2024-09-05 13:08:08.97438
descriptionA crate for dynamically injecting environment variables into child processes.
homepage
repositoryhttps://github.com/shell-pool/subprocess-inject-env
max_upload_size
id1364583
size26,709
Aetf (Aetf)

documentation

README

subprocess-inject-env

This crate provides a mechanism to tweak environment variables within a child subprocess dynamically without the subprocess needing to know anything about it. To do this, we build a .so file that registers a startup hook and launches a background thread listening on a control unix socket. The parent process can then dial in to the control socket, authenticate, and then place an RPC call to setenv. Since the syscall is invoked in the victim child process, the child's environment changes on the fly.

This crate was developed in service of the shpool tool, but it is a general tool so it is split out into its own crate.

subprocess-inject-env is known to work on linux.

Commit count: 0

cargo fmt