bytecodealliance / bytecodealliance/cap-std

Document why DirExt::access on Windows doesn't use their faccess equivalent

Aperta Adatta ai principianti
#416 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
821
Fork
57
Merge medio
1h 16m
PR unite (30g)
4

Descrizione

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?

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by locating the Windows implementation of DirExt::access and read how it currently checks access by opening the file. Compare that approach with the linked Microsoft CRT APIs and faccess Windows implementation, then document the project’s rationale, including any dependency or auditing concerns that are confirmed. Done means the rationale is clear to readers without changing the implementation.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust
Ambito
documentation, security
Tipo di issue
Documentazione
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
68/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.