[FEATURE] Set file timestamps through retained filesystem objects #43
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#43
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 C file bridge needs timestamp-setting interfaces for build outputs and imported tools. Existing administrative metadata setters select paths and carry unsigned nanosecond counters. They cannot express the complete signed file-time domain or provide a conditional operation on a retained compatibility object.
Proposed behavior and scope
Add typed access/modification settings with Explicit, Now and Omit choices, then expose counted
erix_c_utimensatand descriptor-basederix_c_futimensthrough the existing C runtime. Preserve signed seconds and canonical fractions until the actual filesystem checks its representation. A null C time array requests both Now; Now/Omit ignore the corresponding seconds field without reading uninitialized storage.Implement the operation through LibPosixABI, LibIPC, Posixd, VFS and the existing RAM, ext and selected FAT/exFAT providers. Use one shared conditional metadata outcome type and preserve existing permission wire layouts. Standard aliases, cwd reporting and complete stat records remain separate. Local channels and sockets can validate an Omit/Omit request without a fictitious filesystem candidate; their timestamp mutation needs a separate supported metadata contract.
Authority, security and reliability
Keep the original admitted client, root, scope, object and provider handle throughout the operation. Preserve prefix search permissions. Both Now permits the effective owner or a fresh effective-write decision; explicit or mixed changes require ownership. Both Omit performs target validation without final-file mutation permission checks or clock acquisition. Numeric user zero adds no privilege.
VFS obtains current time through its existing authenticated clock route. Clients cannot supply ctime or claim clock provenance, and they receive no additional clock/provider grant. The provider applies both choices and ctime atomically against the original condition. Omit preserves the current provider field. Range refusal precedes effects; supported precision rounds down. Uncertain completion or rollback retains cleanup-only custody and cannot authorize replay, pathname reopening or ordinary errno success.
Acceptance criteria
Alternatives and tradeoffs
Extending the old unsigned path setter would retain its range limitation and miss original-object custody. Reading old times in the frontend to implement Omit would race with other writers. Using the provider's current fields under the same conditional mutation avoids that race.
The semantic target is POSIX.1-2024. The directly consulted permission and precision baseline is the IEEE/Open Group 2017 normative text; the current-edition comparison remains part of acceptance.
Tracking and rollout
Extends mediated C file operations, Posixd filesystem semantics and conditional permission changes, using retained VFS objects. Overall completion is tracked in Phase 6.
Agree on the shared contract first, then migrate providers and VFS alongside Posixd and Cstd. Publish the coordinated consumers and source catalogs before claiming the feature complete.
The coordinated timestamp source is published across the compatibility ABI, C runtime, mediator, VFS and filesystem providers. It preserves signed explicit values and independent Now/Omit settings on retained original objects. Both Omit skips final ownership metadata, and relative directory bases stay held through close or replacement.
The source catalogs and technical manual select the same implementation. The final execution and conformance criterion remains open.