Skip to main content

Module lifecycle

Module lifecycle 

Source
Expand description

Per-user, per-machine derivations for broker pipe naming and SID hashing.

Phase 1 of #228 (issue #230). Two submodules:

  • sid — derives a 16-character hex blake3 hash of the caller’s user identity. On Windows that is the user’s SID (from OpenProcessTokenGetTokenInformation(TokenUser)). On Linux it is format!("{uid}:{machine_id}"). On macOS it is format!("{uid}:{IOPlatformUUID}").
  • names — uses the SID hash to build the four canonical broker pipe names defined in #228.

Re-exports§

pub use crash_dump::CrashDumpError;
pub use crash_dump::CRASH_DUMP_DIR_ENV;
pub use names::backend_pipe;
pub use names::explicit_instance_pipe;
pub use names::private_broker_pipe;
pub use names::shared_broker_pipe;
pub use names::PipePath;
pub use names::PipePathError;
pub use privilege::refuse_privileged_run;
pub use privilege::PrivilegeError;
pub use privilege::PrivilegedIdentity;
pub use privilege::ALLOW_PRIVILEGED_ENV;
pub use process_tree::ProcessTreeCleanup;
pub use process_tree::ProcessTreeError;
pub use sid::user_sid_hash;
pub use sid::SidError;

Modules§

crash_dump
Crash diagnostics for the broker process.
names
Canonical v1 broker pipe-name derivation.
names_v2
v2 broker pipe-name derivation (slice 3b of #483).
privilege
Broker startup privilege checks.
process_tree
Process-tree cleanup setup for the broker.
sid
Per-user identity hash used by every broker pipe name.