[FEATURE] Check directory access through original native realm bindings #12
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/posixd#12
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 realm has authenticated per-client credentials and original directory endpoints, and Vfsd forwards explicit permission evidence, but no compatibility request connects those pieces to a native access decision. A requested ReadWrite configuration ceiling may inherit a read-only native parent, so configuration flags alone cannot prove write admission.
Proposed behavior and scope
Compatibility 1.2 carries only an original directory role/selector and requested access bits. Actual sealed CLAIM clients select immutable effective credentials and original directory receipts. Vfsd checks the live metadata-directory operation and inherited namespace/write ceiling before fetching provider evidence. ReadWrite configuration cannot restore native rights. Complete canonical ACL pages preserve object/revision/count/range, order, required bases/masks and mode correspondence before any deny-only result. Partial ACLs, UID zero and combined partial group grants cannot bypass policy. Zero bits still require actual original-provider existence.
Per-query state retains one snapshot and a bounded streaming fold without a fixed ACL-entry limit. Original outbound and inbound owners remain attached through cancellation, result release and one-shot COMPLETE. Acknowledged Draining(NOT_FOUND) preserves route-loss retirement; unknown failures and unexplained absence keep custody. Stream and directory paths share the original caller helper and host fixture.
Final source review flattened the native client refusal condition without changing its requests or expected outcomes. Two additional signed cleanup/adoption commits select the final source; the implemented scope and twenty-four authored controls are unchanged. No tests, builds or CI observation were run.
Twenty-four new host controls and the extended native binding workload are authored and unrun. The native client requires seven directory-existence queries, five configured write refusals and absent-selector refusal before its inherited stream controls. Existing deadlines and resource policy are unchanged. Rustfmt was applied; all changed code remains below 1,000 lines (maximum 900) with inline rustdoc and missing_docs retained. Contracts and manual TeX are updated. Tests, builds, lint checks, rustdoc, VM/manual/profiler runs and CI observation remain deferred by user instruction; no pass, warning-free build or measured speedup is claimed. Generated API exports retain their explicit older source identity until generation resumes.
Native permission enforcement remains open for complete pathname/open/stat/mutation mediation and remaining provider support. Both EriX guest-build generations and rebuilding Rust/LLVM inside EriX remain required and unproved. Phase completion is 16.23% weighted, 4.81% whole-item, with 20/460 parents and 436/896 sub-items complete.
Add a compatibility directory-access operation on an original configured directory binding. The actual kernel CLAIM selects the sealed client. The payload contains only that client's directory role/selector and requested read/write/search bits; it cannot choose credentials, a native endpoint, another client or a path. Zero bits request an existence check on that original retained object. This operation checks a bound directory; complete POSIX pathname access, open, stat and mutation mediation remain required follow-up work.
Vfsd admits the original live job-lifetime READ_METADATA directory and its retained native scope before fetching evidence. Write requests must also fit the original scope_writable ceiling; no UID, mode or ACL can restore it. Use a disjoint native access-evidence request/response, retaining existing snapshot/page encodings. Only then obtain original-provider metadata. Posixd correlates actual owned replies, requires known ownership/mode and explicit ACL support for permission checks, and applies the sealed client's effective IDs and immutable supplementary groups. UID zero receives no special path. Existence still requires actual native/provider evidence and does not invent a mode or ACL decision.
Collect present ACLs completely across their original object/revision/count. Use a bounded streaming fold over canonical entries so valid ACL size is not limited by a new fixed array or result buffer. Preserve tag/qualifier order, base entries, mandatory masks, mode correspondence and selected-class precedence, including combined group requests. Do not produce a verdict from a prefix or a failed page. Keep credentials selected from the same immutable client plan throughout collection.
Retain both inbound serving and outbound caller custody through collection, cancellation, provider refusal and release. Retain the result before native COMPLETE, attempt completion once and never restart metadata acquisition after refusal. Native ceiling denial precedes permission evaluation. No write, open, credential mutation or new capability acquisition occurs during this query.
Authority, security and reliability
Directory roles and IDs are descriptive lookup keys only after actual caller admission. The original authority row, live receiver, provider route and native scope determine admissibility. Explicit Read configuration adds a further write denial; requested ReadWrite cannot enlarge the provider's inherited ceiling. Unknown, malformed, mismatched or stale evidence never falls back to mode-only success. Metadata revisions are not reusable authorization tokens for later effects. Later filesystem operations must independently admit native authority and enforce their own freshness contract.
Compatibility framing advances coherently to version 1.2; old minor versions remain explicitly refused instead of silently gaining new operation semantics. Existing byte I/O keeps its already-open description behavior. Counted compiler-derived client geometry accounts for the new noncopyable operation state; no hidden heap or small ACL limit is introduced.
Acceptance criteria
Checklist
Alternatives and tradeoffs
Using requested configuration access as proof would ignore inherited native restrictions. Evaluating mode alone when ACL transport fails could enlarge permissions. A small fixed ACL array would unnecessarily refuse valid input; complete streaming validation retains bounded per-client state without claiming that a partial ACL is sufficient. This access query does not substitute for the remaining operation-specific filesystem implementation.
Tracking and rollout
Continue native permission enforcement using original metadata forwarding. Coordinate compatibility ABI, native IPC, Vfsd, Posixd, manual, integration and phase completion. Full filesystem policy, complete provider ACL support and both EriX guest-build generations plus the external Rust/LLVM rebuild remain open.
Related records and contracts
erikinkinen referenced this issue from erix/blockd2026-09-29 13:37:44 +02:00
erikinkinen referenced this issue from erix/coreutils2026-09-29 13:37:57 +02:00
erikinkinen referenced this issue from erix/crashd2026-09-29 13:38:17 +02:00
erikinkinen referenced this issue from erix/deviced2026-09-29 13:39:00 +02:00
erikinkinen referenced this issue from erix/docs2026-09-29 13:39:15 +02:00
erikinkinen referenced this issue from erix/drv-acpi2026-09-29 13:39:26 +02:00
erikinkinen referenced this issue from erix/drv-i80422026-09-29 13:39:44 +02:00
erikinkinen referenced this issue from erix/drv-ps2-keyboard2026-09-29 13:40:00 +02:00
erikinkinen referenced this issue from erix/drv-ps2-mouse2026-09-29 13:40:06 +02:00
erikinkinen referenced this issue from erix/drv-rtc-cmos2026-09-29 13:40:19 +02:00
erikinkinen referenced this issue from erix/drv-serial2026-09-29 13:40:26 +02:00
erikinkinen referenced this issue from erix/drv-virtio-block2026-09-29 13:40:41 +02:00
erikinkinen referenced this issue from erix/dynlinkd2026-09-29 13:40:52 +02:00
erikinkinen referenced this issue from erix/e2fsd2026-09-29 13:41:07 +02:00
erikinkinen referenced this issue from erix/exsh2026-09-29 13:41:22 +02:00
erikinkinen referenced this issue from erix/extop2026-09-29 13:41:25 +02:00
erikinkinen referenced this issue from erix/fatd2026-09-29 13:41:28 +02:00
erikinkinen referenced this issue from erix/fbcond2026-09-29 13:41:32 +02:00
erikinkinen referenced this issue from erix/hotplugd2026-09-29 13:41:38 +02:00
erikinkinen referenced this issue from erix/inputd2026-09-29 13:41:43 +02:00
erikinkinen referenced this issue from erix/integration2026-09-29 13:41:48 +02:00
erikinkinen referenced this issue from erix/irqd2026-09-29 13:41:53 +02:00
erikinkinen referenced this issue from erix/kernel2026-09-29 13:42:13 +02:00
erikinkinen referenced this issue from erix/keyd2026-09-29 13:42:24 +02:00
erikinkinen referenced this issue from erix/launchd2026-09-29 13:42:30 +02:00
erikinkinen referenced this issue from erix/lib-block2026-09-29 13:42:32 +02:00
erikinkinen referenced this issue from erix/lib-bootstrap2026-09-29 13:42:34 +02:00
erikinkinen referenced this issue from erix/lib-capabi2026-09-29 13:42:36 +02:00
erikinkinen referenced this issue from erix/lib-driver2026-09-29 13:42:38 +02:00
erikinkinen referenced this issue from erix/lib-input2026-09-29 13:42:39 +02:00
erikinkinen referenced this issue from erix/lib-interrupt2026-09-29 13:42:41 +02:00
erikinkinen referenced this issue from erix/lib-ipc2026-09-29 13:42:42 +02:00
erikinkinen referenced this issue from erix/lib-log2026-09-29 13:42:43 +02:00
erikinkinen referenced this issue from erix/lib-posixabi2026-09-29 13:42:44 +02:00
erikinkinen referenced this issue from erix/lib-service2026-09-29 13:42:44 +02:00
erikinkinen referenced this issue from erix/lib-stdio2026-09-29 13:42:46 +02:00
erikinkinen referenced this issue from erix/lib-time2026-09-29 13:42:46 +02:00
erikinkinen referenced this issue from erix/lib-tty2026-09-29 13:42:47 +02:00
erikinkinen referenced this issue from erix/lib-vfs2026-09-29 13:42:49 +02:00
erikinkinen referenced this issue from erix/loaderd2026-09-29 13:42:50 +02:00
erikinkinen referenced this issue from erix/logd2026-09-29 13:42:52 +02:00
erikinkinen referenced this issue from erix/memd2026-09-29 13:42:53 +02:00
erikinkinen referenced this issue from erix/named2026-09-29 13:42:54 +02:00
erikinkinen referenced this issue from erix/pagerd2026-09-29 13:42:54 +02:00
erikinkinen referenced this issue2026-09-29 13:42:56 +02:00
erikinkinen referenced this issue from erix/powerboxd2026-09-29 13:42:58 +02:00
erikinkinen referenced this issue from erix/probed2026-09-29 13:43:00 +02:00
erikinkinen referenced this issue from erix/procd2026-09-29 13:43:02 +02:00
erikinkinen referenced this issue from erix/ramfsd2026-09-29 13:43:05 +02:00
erikinkinen referenced this issue from erix/rootd2026-09-29 13:43:06 +02:00
erikinkinen referenced this issue from erix/seriald2026-09-29 13:43:08 +02:00
erikinkinen referenced this issue from erix/timed2026-09-29 13:43:09 +02:00
erikinkinen referenced this issue from erix/ttyd2026-09-29 13:43:12 +02:00
erikinkinen referenced this issue from erix/vfsd2026-09-29 13:43:13 +02:00
erikinkinen referenced this issue from erix/vspaced2026-09-29 13:43:14 +02:00