refactor(#2431): extract hive-priv-sock crate from hive-sh4re
Split the priv-socket wire types (PrivRequest/PrivResponse/PrivEvent and friends) out of hive-sh4re into their own hive-priv-sock crate, mirroring the existing hive-host-sock split. hive-priv — the root-privileged helper — now depends on just this narrow protocol crate instead of the much larger daemon-shared crate, shrinking its dependency surface and making the privsep boundary easier to audit. No server/client implementation lives here, only the wire contract; hive-c0re still depends on hive-sh4re directly for everything else.
This commit is contained in:
parent
ffde085c35
commit
e0461e1af6
18 changed files with 52 additions and 26 deletions
|
|
@ -31,7 +31,7 @@ pub const STATE_ROOT: &str = "/var/lib/hyperhive";
|
|||
/// `/run/hyperhive` — hive-c0re's runtime root (host admin socket, the
|
||||
/// per-agent runtime dirs). Regenerated each boot; not persistent state.
|
||||
// nix: `RuntimeDirectory=hyperhive` on the hive-c0re service (hive-c0re.nix) — must match.
|
||||
// sh4re: `hive_sh4re::priv_proto::AGENT_RUNTIME_ROOT` is `RUNTIME_ROOT + "/agents"` and must
|
||||
// priv-sock: `hive_priv_sock::AGENT_RUNTIME_ROOT` is `RUNTIME_ROOT + "/agents"` and must
|
||||
// stay in sync; the privsep boundary prevents importing across the crate.
|
||||
pub const RUNTIME_ROOT: &str = "/run/hyperhive";
|
||||
|
||||
|
|
@ -163,7 +163,7 @@ pub fn agent_sockets_file() -> PathBuf {
|
|||
/// dashboard state-file allow-list uses it for `strip_prefix` /
|
||||
/// `starts_with` checks), so it stays a const; [`agents_root`] wraps it.
|
||||
// nix: agent container bind-mount source (harness modules / agent.nix template) — must match.
|
||||
// sh4re: `hive_sh4re::priv_proto::AGENT_STATE_ROOT` is the same value and must stay in sync;
|
||||
// priv-sock: `hive_priv_sock::AGENT_STATE_ROOT` is the same value and must stay in sync;
|
||||
// the privsep boundary prevents importing across the crate.
|
||||
pub const AGENTS_ROOT: &str = "/var/lib/hyperhive/agents";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue