hive-priv: never leave an agent dir or the agents root root-owned on a fresh host
This commit is contained in:
parent
52cdfe84a0
commit
24c5c02942
1 changed files with 78 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue