Skip to main content

running_process/broker/lifecycle/
mod.rs

1//! Per-user, per-machine derivations for broker pipe naming and SID
2//! hashing.
3//!
4//! Phase 1 of #228 (issue #230). Two submodules:
5//!
6//! - [`sid`] — derives a 16-character hex blake3 hash of the caller's
7//!   user identity. On Windows that is the user's SID (from
8//!   `OpenProcessToken` → `GetTokenInformation(TokenUser)`). On Linux
9//!   it is `format!("{uid}:{machine_id}")`. On macOS it is
10//!   `format!("{uid}:{IOPlatformUUID}")`.
11//! - [`names`] — uses the SID hash to build the four canonical broker
12//!   pipe names defined in #228.
13
14pub mod crash_dump;
15pub mod names;
16pub mod privilege;
17pub mod process_tree;
18pub mod sid;
19
20pub use crash_dump::{CrashDumpError, CRASH_DUMP_DIR_ENV};
21pub use names::{
22    backend_pipe, explicit_instance_pipe, private_broker_pipe, shared_broker_pipe, PipePath,
23    PipePathError,
24};
25pub use privilege::{
26    refuse_privileged_run, PrivilegeError, PrivilegedIdentity, ALLOW_PRIVILEGED_ENV,
27};
28pub use process_tree::{ProcessTreeCleanup, ProcessTreeError};
29pub use sid::{user_sid_hash, SidError};