Improve handle management - #1106
Conversation
|
🤖 SemverChecks 🤖 Click for details |
wdcui
left a comment
There was a problem hiding this comment.
LGTM. Thanks. GPT-5.6 sol reported the following potential issue:
Medium — litebox/src/fs/resolver.rs:211-217, 653-676
chmod / chown now require execute permission on the target directory itself. An owner cannot restore /locked from mode 0600 to 0700 , although only the parent should require search permission. Exclude the final target directory from walk-permission checks for metadata operations.
The concern was:
• Previously, chmod("/a/locked") walked only /a .
• Now path_handle() walks /a/locked .
• For a directory, check_walk_permissions() checks execute permission on locked too.
• POSIX requires search permission on parent directories, not the final directory being changed.
|
Hmm, this is a valid concern, will fix up in a separate PR |
This PR merges some operations to use a single
Handleenum, rather than do them individually. This simplifies theBackendinterface and also allows for supportingchmodof/(for example), which is needed as more backends move to the new design.