Watch
0
0
Fork
You've already forked hyperhive
0

hive-priv: never leave an agent dir or the agents root root-owned on a fresh host

This commit is contained in:
damocles 2026-11-09 13:53:08 +01:00
commit 24c5c02942

View file

@ -472,7 +472,11 @@ pub enum PrivRequest {
/// hive-priv derives the path from `agent_name` (never passed over the
/// wire), validates the name, then:
/// - path already exists (dir or subvol) → no-op (progressive: existing
/// agents are left exactly as they are, never auto-migrated);
/// agents are left exactly as they are, never auto-migrated), except
/// that a root-owned dir under a non-root `AGENT_STATE_ROOT` is chowned
/// to the root's owner, since hive-c0re cannot write below it;
/// - `AGENT_STATE_ROOT` itself missing → created and chowned to its
/// parent's owner, never left root-owned;
/// - parent FS is not btrfs → no-op (hive-c0re's normal `create_dir_all`
/// makes a plain directory, the pre-subvolume behaviour);
/// - else → `btrfs subvolume create <path>` and chown it to the owner of