bytecodealliance / bytecodealliance/cap-std
Document why DirExt::access on Windows doesn't use their faccess equivalent
- Ngôn ngữ chính
- Rust
- Star
- 821
- Fork
- 57
- Merge trung bình
- 1 giờ 16 phút
- Pull request đã merge (30 ngày)
- 4
Mô tả
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?
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách xác định triển khai Windows của DirExt::access và đọc cách hiện tại nó kiểm tra quyền truy cập bằng cách mở tệp. So sánh cách tiếp cận đó với các Microsoft CRT APIs được liên kết và triển khai Windows của faccess, sau đó ghi lại cơ sở của dự án, bao gồm mọi mối quan ngại đã được xác nhận về dependency hoặc auditing. Công việc được xem là hoàn tất khi cơ sở này rõ ràng đối với người đọc mà không thay đổi triển khai.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- rust
- Lĩnh vực
- documentation, security
- Loại issue
- Tài liệu
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 68/100