aboutsummaryrefslogtreecommitdiff
path: root/crates/fs-mistrust/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* add_warning: add reference to arti#2556Jim Newsome2026-07-151-1/+1
|
* Removed unnecessary lintpryty262026-07-151-1/+1
| | | | Removed unnecessary lint
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+2
| | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* Apply 3 suggestion(s) to 2 file(s)Nick Mathewson2026-05-271-1/+1
| | | Co-authored-by: gabi-250 <[email protected]>
* config: Add a method to fill in a builder with unset defaultsNick Mathewson2026-05-271-0/+12
| | | | | | | | | | | | | | | This new method modifies a builder by replacing any unset values that have a default with that default. We're using this method so that we can re-serialize a builder into a `ConfigurationTree` with all of its default values included. In all cases, `b.apply_defaults()?; b.build()` should produce the same output as `b.build()`. The interesting parts of this commit are in tor_config::load and tor_config::derive. The rest of this commit just adds `apply_defaults` to other builders that _aren't_ made with `derive_deftly(TorConfig)`.
* Allow clippy::collapsible_if to triggerGabriela Moldovan2026-02-161-0/+1
| | | | | | | | | `clippy::collapsible_if` started triggering after bumping the MSRV to 1.88. Since this triggers from a lot of places, and since there even are a couple of instances where we explicitly allow `clippy::collapsible_ifs`, I've opened #2342 for deciding what to do about it.
* maint/add_warning: Run script to add new warningGabriela Moldovan2026-01-271-0/+1
| | | | This adds the lint to all our crates.
* fs-mistrust: Treat "" as a NotFound Path.Nick Mathewson2025-11-241-0/+10
| | | | | | | | | This makes fs-mistrust consistent with stat() and mkdir() and friends, which consider "" to be an invalid path. Previously, "" was accepted whenever mistrust was enabled, but rejected whenever mistrust was disabled. Closes #2265.
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-2/+2
| | | | Run maint/add_warning
* Remove "doc_auto_cfg" incantation from all crates.Nick Mathewson2025-09-291-1/+1
| | | | This feature has been removed from nightly, in favor of doc_cfg.
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-2/+2
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* Temporarily suppress mismatched_lifetime_syntaxes.Gabriela Moldovan2025-07-071-0/+1
| | | | See #2060.
* fix compiling fs-misstrust on tvOSyaucp2025-03-261-6/+12
|
* fix: fix typosDimitris Apostolou2025-01-301-1/+1
|
* fs-mistrust: Add FileAccess for Verifier (and Mistrust).Nick Mathewson2025-01-141-0/+12
|
* fs-mistrust: Have Verifier check methods take self by reference.Nick Mathewson2025-01-141-2/+2
| | | | There is no reason for these to consume self.
* fs-mistrust: Define a (stub) FileAccess type.Nick Mathewson2025-01-141-0/+2
| | | | | We're going to move functionality and configuration functions here to implement #1746.
* clippy: deny `mod_module_files`Steven Engler2025-01-061-0/+1
| | | | | | Denies 'mod.rs' files for consistency. https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
* fs-mistrust: trim whitespace in env var valuesSteven Engler2024-12-181-1/+2
|
* fs-mistrust: commit to stable env var handlingSteven Engler2024-12-181-4/+32
| | | | | | | | Since these environment variables become part of the stable API for applications that use fs-mistrust, we should be explicit about how these environment variables are interpreted so that applications can show the values in their documentation or help text, and so that we don't accidentally change the behaviour and break applications.
* fs-mistrust: (docs) fix incomplete list of env variable valuesSteven Engler2024-12-181-2/+2
|
* add_warnings, *: Allow clippy::needless_lifetimesNick Mathewson2024-12-031-0/+1
| | | | | | | | In 1.83, this warning triggers on many of our crates. We're thinking of fixing them all, but for now, we're going to disable the warning. This is part of #1765.
* fs-mistrust: Decorate some items with missing walkdir cfgIan Jackson2024-08-191-0/+1
|
* Re-run maint/add_warning.Nick Mathewson2024-05-061-2/+2
| | | | This commit is automatically generated.
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* Fix typos in doc commentsTobias Stoeckmann2024-03-061-1/+1
|
* deny clippy::unchecked_duration_subtractiontrinity-1686a2024-02-291-0/+1
|
* fs-mistrust: Explain where a Verifier comes fromIan Jackson2023-12-131-0/+2
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Run add_warnings on all files.Nick Mathewson2023-08-041-2/+2
|
* fs-mistrust: forbid unsafe codeIan Jackson2023-07-141-0/+8
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+2
|
* Run add_warning to remove `missing_panics_doc` deny.Nick Mathewson2023-07-061-1/+0
| | | | Closes #950.
* lints: Run maint/add_warning to actually apply new lintsIan Jackson2023-06-211-0/+2
|
* add opaque ErrorHint API, impl ErrorHint from BadPermissionsShady Katy2023-01-271-1/+1
|
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-271-0/+1
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* Disable clippy::unlinlined-format-argsNick Mathewson2023-01-271-0/+1
| | | | | | | | This warning kind of snuck up on us! (See #748) For now, let's disable it. (I've cleaned it up in a couple of examples, since those are meant to be more idiomatic and user-facing.) Closes #748.
* test lint blocks: Add many many automaticallyIan Jackson2022-12-121-0/+8
| | | | | This is precisely the result of running the rune in maint/adhoc-add-lint-blocks.
* Run add_warnings.Nick Mathewson2022-11-031-0/+1
|
* cargo fmt to remove blank linesIan Jackson2022-10-121-1/+0
| | | | | | | Apparently cargo fmt doesn't like these, which my perl rune didn't delete. This commit is precisely the result of `cargo fmt`.
* Replace all README copies in src/lib.rs with includesIan Jackson2022-10-121-239/+1
| | | | | | | | The feature we want is `#[doc = include_str!("README.md")]`, which is stable since 1.54 and our MSRV is now 1.56. This commit is precisely the result of the following Perl rune: perl -i~ -0777 -pe 's{(^//!(?!.*\@\@).*\n)+}{#![doc = include_str!("../README.md")]\n}m' crates/*/src/lib.rs
* Merge branch 'compact_home_2' into 'main'Nick Mathewson2022-08-311-0/+2
|\ | | | | | | | | | | | | Represent the home directory as ${HOME} or %UserProfile% Closes #555 See merge request tpo/core/arti!700
| * Use anonymize_home() when displaying various messages.Nick Mathewson2022-08-311-2/+2
| | | | | | | | Closes #555
| * fs-mistrust: Add a `anonymize_home` extension fn for Path.Nick Mathewson2022-08-311-0/+2
| | | | | | | | | | | | This function transforms `/home/nickm/.config` to `${HOME}/.config/`, so that we can expose the username less in our logs.
* | Comment out docstring as it fails to compile on Windows.Alexander Færøy2022-08-301-2/+3
| | | | | | | | | | | | | | | | | | | | | | This patch comments out a method call to `trust_group()` as this method is not available on all platforms that Arti builds on right now and thus fails to compile there. I have added a comment that the given call is not available on non-Unix like platforms. See: tpo/core/arti#557.
* | Disable 3 tests in fs-mistrust.Alexander Færøy2022-08-301-0/+3
| | | | | | | | | | | | | | | | This patch disables `readable_ok()`, `multiple_errors()`, and `check_contents()` as they all rely on permission issues on groups being detected properly which is not the case on Windows right now. See: tpo/core/arti#557.
* | Refactor the construction of the `Mistrust` type in tests.Alexander Færøy2022-08-291-97/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Disable fs-mistrust's simple_cases() unit test on non-Unix.Alexander Færøy2022-08-261-1/+5
| | | | | | | | | | | | | | | | This patch disables the simple_cases() test on non-Unix platforms and hides the LinkType type import on non-Unix where we won't be testing symbolic link features. See: tpo/core/arti#557.
* | Fix compilation of tests for Windows.Alexander Færøy2022-08-261-13/+49
|/ | | | | | | This patch allows us to compile the fs-mistrust tests on Windows where the `trust_no_group_id()` method is unavailable. See: tpo/core/arti#557.
* enable doc_auto_cfg feature on every crate when documenting for docs.rstrinity-1686a2022-08-241-0/+1
|