Improved support for changing symlink permissions
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- rust
调研方向
从 cap-primitives/src/rustix/linux/fs/procfs.rs 开始,跟踪 fs::set_permissions 的实现,尤其是 AT_NOFOLLOW_SYMLINK 以及 issue 中描述的 fchmod 行为。调查所述的安全性理由和涉及的 Unix 平台,然后确定是否可以在不改变当前默认语义的情况下支持更改 symlink 权限。完成的标准是确定 API 和范围,并明确 zip 提取用例的行为。
由索引模型根据 Issue 内容生成。
描述
Hello 👋,
I'm trying to implement some logic that extracts a zip file using cap-primitives and ran into a snag with how fs::set_permissions is currently implemented. In the general UNIX implementation it says even AT_NOFOLLOW_SYMLINK with fchmodat is not enough because it would modify the symlink itself, and that it is undesirable behavior. So, because of that, its implemented as a regular fchmod. Its not clear to me why this is undesirable at a glance though.
In my case however, I am actually trying to change the symlink itself based on permission bits that come from the zip file and the current behavior makes that impossible as it always dereferences the symlink and changes the permissions of the linked item instead. This is an odd use case, but I have the constraint of the process umask set at startup being more restrictive then what the zipped file permissions are, so I need to change everything written out to disk after writing to get the correct resulting permissions.
Is this a feature that you would consider adding to cap-primitives, or is "weird" symlink handling something that's considered out-of-scope?
- 主要语言
- Rust
- 星标
- 821
- 派生
- 59
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
bytecodealliance/cap-std 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
bytecodealliance/cap-std#427 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
bytecodealliance/cap-std#416 · 2 条评论 ·
-
难度 5/5 一周以上 新手友好度 15/100
bytecodealliance/cap-std#426 · 2 条评论 ·
-
难度 5/5 一周以上 新手友好度 45/100
bytecodealliance/cap-std#423 · 5 条评论 ·
-
难度 5/5 一周以上 新手友好度 42/100
bytecodealliance/cap-std#408 · 4 条评论 · 2 个 reaction ·
查看 bytecodealliance/cap-std 的全部 Issue
相似的 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 85/100
-
难度 2/5 1-3 小时 新手友好度 75/100
yantrikos/yantrik-os#255 ·
-
bug CLI custom-model
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 70/100
raphamorim/rio#1956 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
rust-bitcoin/rust-bitcoin#6930 · 1 条评论 ·