bytecodealliance / bytecodealliance/cap-std
Document why DirExt::access on Windows doesn't use their faccess equivalent
- 主要言語
- Rust
- スター
- 821
- フォーク
- 57
- 平均マージ
- 1時間 16分
- マージ済み PR(30日)
- 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