Authorize O_TRUNC before applying truncation
- Dominant language
- Rust
- Stars
- 2.7k
- Forks
- 144
- Avg merge
- 12h 21m
- Merged PRs (30d)
- 146
Description
The current fs engine and resolver-managed backends can apply O_TRUNC before the caller permissions are checked. A denied open may therefore empty a file, and the intended Linux-compatible behavior of O_RDONLY|O_TRUNC also needs confirmation with the original fs author. Define the desired semantics, then coordinate resolver authorization with InMem and Overlay truncation timing and add focused permission tests. Deferred from #1318 to keep that PR behavior-neutral.
Contributor guide
Research direction
Start by reading the resolver authorization and truncation paths in the fs engine, InMem, and Overlay backends. Confirm the intended Linux-compatible O_RDONLY|O_TRUNC behavior with the original fs author, then define authorization-before-truncation semantics and add focused permission tests covering denied opens.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems, security
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100