bytecodealliance / bytecodealliance/cap-std
Document why DirExt::access on Windows doesn't use their faccess equivalent
- 主要语言
- Rust
- 星标
- 821
- 派生
- 57
- 平均合并
- 1 小时 16 分钟
- 30 天内合并 PR
- 4
描述
I noticed that your Windows implementation of `DirExt::access` just tries opening the file.
I understand if [_access, _waccess, t_access](https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/access-waccess?view=msvc-170) or [_access_s, _waccess_s, _taccess_s](https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/access-s-waccess-s?view=msvc-170) from the Microsoft C Runtime impose additional dependencies you want to avoid, and that the Win32 API-native version's [overcomplicated credentials](https://blog.aaronballman.com/2011/08/how-to-check-access-rights/) blow up to six pages in the [faccess](https://github.com/Freaky/faccess/) crate's Windows implementation ([Link to the source file](https://github.com/Freaky/faccess/blob/master/src/lib.rs), MIT-licensed) once you address various edge cases.
However, I was unable to find any clear documentation for the rationale behind that. (Which I'm guessing is "auditing burden".)
Could that be improved, please?
贡献指南
调研方向
首先定位 DirExt::access 的 Windows 实现,并阅读它当前如何通过打开文件来检查访问权限。将这种方式与链接的 Microsoft CRT APIs 和 faccess Windows 实现进行比较,然后记录项目采用该方式的理由,包括已确认的任何依赖项或审计方面的疑虑。完成标准是:在不更改实现的情况下,该理由对读者而言清晰明确。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- rust
- 领域
- documentation, security
- Issue 类型
- 文档
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 68/100