[FEATURE] Prepare acquisition scopes from an explicit directory root #28
Labels
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/launchd#28
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem and motivation
The current acquisition-scope request preserves the transferred directory's existing root and cwd. Filesystem workloads need a dedicated directory as both root and cwd, with access confined to that selection.
Proposed behavior and scope
Add a separate rooted acquisition request carrying the existing realm/client/source handles and a raw relative directory selector. Resolve it through the existing directory-root path, then prepare the acquisition scope from the narrowed result. Keep the current unrooted request intact.
Use this for an explicit filesystem heap-test profile with a private root and RAM-backed
/tmp. Grant the writer its prepared scope and clock; the peer retains no filesystem authority. Preserve existing byte-only profiles.Authority, security and reliability
The caller must transfer its original directory authority. Selector bytes grant nothing and resolution must stay within that source's native ceiling. Positively retire broader anchors before publishing the selected directory as root and cwd.
Keep both provider and acquisition retirement keys, source/result handles and the first failure through preparation and cleanup. Use monotonic phases; uncertain completion must retain owners and prevent replay or reuse.
Acceptance criteria
Alternatives and tradeoffs
The caller could select an already prepared root receipt, but that owner currently remains inside Launchd. An explicit selector lets Launchd reuse its existing narrowing path without exporting another authority handle.
Tracking and rollout
Related: Phase 6, C file adapters, cwd, and directory failure context. Define the request and lifecycle first, then adopt the filesystem workload and its native scenario.
Rooted acquisition preparation is implemented in Launchd and LibIPC. Integration selects the separate filesystem heap profile, with a privately rooted scope for the writer and no filesystem grant for its peer. Native execution, complete cleanup and stack measurements remain open.