summaryrefslogtreecommitdiff
path: root/crates/fs-mistrust/src/testing.rs
Commit message (Collapse)AuthorAgeFilesLines
* fs-mistrust: fix build on non-unix systemsTobias Stoeckmann2025-04-251-0/+1
| | | | | | The TrustAdminOnly enum value is only defined for unix systems. Consider this fact in mistrust_build function to fix build on e.g. Windows systems.
* Merge branch 'android-build' into 'main'wesleyac2025-04-031-3/+28
|\ | | | | | | | | fix builds for Android See merge request tpo/core/arti!2824
| * fix builds for AndroidYaksh Bariya2025-03-031-3/+28
| | | | | | | | | | | | | | This does fix builds for both the arti binary and the tests. Most tests seem to be passing, some are failing. I will try to investigate them and send fixes/create issue to highlight them. Hopefully this helps arti in being production ready fast.
* | fix compiling fs-misstrust on tvOSyaucp2025-03-261-2/+4
|/
* Use `expect()` instead of `unwrap()` in `mistrust_build()`.Alexander Færøy2022-08-291-1/+1
| | | | See: tpo/core/arti#557.
* Refactor the construction of the `Mistrust` type in tests.Alexander Færøy2022-08-291-0/+54
| | | | | | | | | | | | | This patch refactors how we construct the `Mistrust` type in the tests found in the fs-mistrust crate such that it is possible to construct an instance of the `Mistrust` type using a set of operations available via the `MistrustBuilder`'s methods. We handle some of the portability issues found while testing this code on Windows in the convenience function `mistrust_build()` instead of having duplicated code in multiple test cases. See: tpo/core/arti#557.
* Document in link_rel() why we do not support symlinks on Windows.Alexander Færøy2022-08-291-0/+4
| | | | | | | This patch adds a comment to the `link_rel()` function in fs-mistrust to explain why we ignore symlink creation on the Windows platform. See: tpo/core/arti#557.
* Mark fs-mistrust's link_rel() and link_abs() as Unix-only.Alexander Færøy2022-08-261-10/+3
| | | | | | | Since we are not going to test symlink creation on Windows we remove this code from the testing module. See: tpo/core/arti#557.
* Second cut at a fs-mistrust crate.Nick Mathewson2022-05-031-0/+148
This crate is meant to solve #315 by giving a way to make sure that a file or directory is only accessible by trusted users. I've tried to explain carefully (in comments and documentation) what this crate is doing and why, under the assumption that it will someday be read by another person like me who does _not_ live and breathe unix file permissions. The crate is still missing some key features, noted in the TODO section. It differs from the first version of the crate by taking a more principled approach to directory checking: it emulates the path lookup process (reading symlinks and all) one path change at a time, thus ensuring that we check every directory which could enable an untrusted user to get to our target file, _or_ which could enable them to get to any symlink that would get them to the target file. The API is also slightly different: It separates the `Mistrust` object (where you configure what you do or do not trust) from the `Verifier` (where you set up a check that you want to perform on a single object). Verifiers are set up to be a bit ephemeral, so that it is hard to accidentally declare that _every_ object is meant to be readable when you only mean that _some_ objects may be readable.