summaryrefslogtreecommitdiff
path: root/crates/fs-mistrust
Commit message (Collapse)AuthorAgeFilesLines
* Bump the versions of the non-{arti-,tor-} cratesGabriela Moldovan2025-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-{arti-,tor-} crates are: ``` ./maint/list_crates | rg -v '^(tor|arti)' oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret fs-mistrust safelog retry-error futures-copy ``` We split them in the following categories: * crates with no changes (no version bumps): None ``` maint/changed_crates -v "arti-v$LAST_VERSION" 2>&1 >/dev/null | grep -i "no change" | grep -v '\(tor\|arti\)-' ``` * crates that only have non-functional changes (bump the patch version, but not the dependend-on version): - oneshot-fused-workaround - slotmap-careful - test-temp-dir - fslock-guard - equix - caret - safelog - retry-error * crates where functional changes were made, but no APIs were added or broken: - hashx - fs-mistrust - futures-copy * crates where APIs were broken (bump minor): None The bumps from this commit were created using this script: ``` PATCH_NF=( oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard equix caret safelog retry-error ) PATCH=" hashx fs-mistrust futures-copy " ./maint/bump_nodep "${PATCH_NF[@]}" for crate in $PATCH; do cargo set-version --bump patch -p $crate; done ```
* fs-mistrust: Quote filenames in error messages.Nick Mathewson2025-11-241-9/+9
| | | | | | | | | | | This will help a lot when people try to create files with names like `""` and `" "` and `"foo "` and `"foo! Unless"`. It won't help as much with files that have names like `"filename\". To solve this problem, run install-trojan-now ; \""`. Fortunately, we don't let adversaries choose filenames. Closes #2266.
* fs-mistrust: Treat "" as a NotFound Path.Nick Mathewson2025-11-243-0/+14
| | | | | | | | | 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-069-10/+10
| | | | Run maint/add_warning
* maint: bump minor versions of all published cratesSteven Engler2025-10-291-1/+1
| | | | | | | ```bash readarray -t publish < <(cargo metadata --format-version 1 | jq -r '.packages[] | select((.id | startswith("path+file:///")) and (.rust_version != null) and (.publish == null or .publish == true or .publish != [])) | .name') for package in "${publish[@]}"; do echo "$package:"; cargo set-version --bump minor -p "$package"; done ```
* Bump MSRV from 1.85.1 to 1.86Clara Engler2025-10-211-1/+1
|
* release: Bump versions.Wesley Aptekar-Cassels2025-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because we've updated our MSRV, we must bump the minor version for every package. This was done as follows: cargo set-version -p arti 1.6.0 cargo set-version -p oneshot-fused-workaround 0.4.0 cargo set-version -p slotmap-careful 0.4.0 cargo set-version -p test-temp-dir 0.5.0 cargo set-version -p fslock-guard 0.4.0 cargo set-version -p hashx 0.5.0 cargo set-version -p equix 0.4.0 cargo set-version -p caret 0.7.0 cargo set-version -p fs-mistrust 0.12.0 cargo set-version -p safelog 0.6.0 cargo set-version -p retry-error 0.8.0 xargs -I P <<END cargo set-version -p P 0.35.0 tor-basic-utils tor-error tor-general-addr tor-geoip tor-rtcompat tor-rtmock tor-async-utils tor-config tor-config-path tor-rpc-connect tor-log-ratelim tor-rpcbase tor-memquota tor-units tor-llcrypto tor-bytes tor-protover tor-checkable tor-cert tor-key-forge tor-hscrypto tor-socksproto tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-relay-selection tor-persist tor-keymgr tor-chanmgr tor-ptmgr tor-dircommon tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-dirserver tor-hsclient tor-hsservice tor-hsrproxy tor-relay-crypto arti-client arti-relay arti-rpcserver arti-ureq arti-rpc-client-core END
* 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.
* Bump MSRV from 1.85 to 1.85.1Nick Mathewson2025-09-091-1/+1
| | | | Closes #2107
* Bump the minor version of every published crate except for `arti`.Nick Mathewson2025-08-281-1/+1
| | | | | | | | Per policy, we bump the minor version of every tor-*, arti-* crate on each release. We have updated our MSRV, so we're treating this as a breaking change for our non-(arti/tor)-prefixed crates too.
* Upgrade to toml-0.9.5.Nick Mathewson2025-08-181-1/+1
| | | | Closes #2093.
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-075-8/+8
| | | | | | | | | | | | | | 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.
* Update code for Edition 2024Nick Mathewson2025-08-071-2/+5
| | | | | | | | | | | | | | | | | | 1. Run cargo fix --edition 2. Selectively revert the "if let"->"match" changes. These changes are meant to protect us from the lifetime changes for "if let" bindings in Rust 2024. But we're not actually relying on the old lifetime rules anywhere, and the match syntax here is quite ugly. 3. Automatically revert `$pat:expr_2021` to `$pat:expr`. (We don't actually want to restrict the expression syntax that our macros accept). Done with `git grep -l expr_2021 | xargs perl -i -pe 's/expr_2021/expr/g;'` 4. Run cargo fmt.
* Merge branch 'msrv-1.85' into 'main'Nick Mathewson2025-08-051-1/+1
|\ | | | | | | | | | | | | Bump MSRV to Rust 1.85 Closes #2095 See merge request tpo/core/arti!3128
| * Set MSRV to 1.85.Nick Mathewson2025-08-051-1/+1
| |
* | Fix Windows compile warningsTobias Stoeckmann2025-08-051-0/+3
|/ | | | | Use unix-specific crates only if needed and suppress clippy warnings of unused variables if their usage is unix-specific.
* Bump the versions of the non-{arti-,tor-} crates.Gabriela Moldovan2025-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-{arti-,tor-} crates are: ``` ./maint/list_crates | rg -v '^(tor|arti)' oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret fs-mistrust safelog retry-error ``` We split them in the following categories: * crates with no changes (no version bumps): None ``` maint/changed_crates -v "arti-v$LAST_VERSION" 2>&1 >/dev/null | grep -i "no change" | grep -v '\(tor\|arti\)-' ``` * crates that only have non-functional changes (bump the patch version): - oneshot-fused-workaround - slotmap-careful - test-temp-dir - fslock-guard - hashx - equix - caret - safelog - retry-error * crates where APIs were broken (bump minor): - fs-mistrust (the implicit once_cell feature was removed) The bumps from this commit were created using this script: ``` PATCH=" oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret safelog retry-error " for crate in $PATCH; do cargo set-version --bump patch -p $crate; done MINOR=" fs-mistrust " for crate in $MINOR; do cargo set-version --bump minor -p $crate; done ```
* Temporarily suppress mismatched_lifetime_syntaxes.Gabriela Moldovan2025-07-071-0/+1
| | | | See #2060.
* fs-mistrust: Removed dependency on `once_cell`hashcatHitman2025-06-143-8/+6
| | | | | | - Replaced `once_cell::sync::Lazy` with `std::sync::LazyLock`. Signed-off-by: hashcatHitman <[email protected]>
* release: Bump crates non-arti/non-tor crates with functional changes.Alexander Hansen Færøy2025-06-051-1/+1
| | | | | | | | This is done using: cargo set-version --bump patch -p fs-mistrust cargo set-version --bump patch -p equix cargo set-version --bump patch -p fslock-guard
* ./maint/cargo_sort: Run cargo-sort on the entire workspace.Gabriela Moldovan2025-05-271-7/+7
| | | | | | | | | | | | | | | | | | | The [latest version] of `cargo-sort` is more opinionated than the previous one, and is now causing the `rust-checks` job to fail on `main`. This commit applies the fixes needed to satisfy the new `cargo-sort` rules. These changes were generated by running `cargo sort --workspace` several times, until `cargo sort --check --workspace` finally succeeded (it couldn't fix all the errors in one go, for some reason). I have omitted the changes `cargo-sort` made to the top-level `Cargo.toml`, to preserve the topological ordering of the workspace members. Closes #2014 [latest version]: https://github.com/DevinR528/cargo-sort/blob/f066ae80e5e6f5c1d8f0e2b8099461dcb97d9656/changelog.md#200
* *: use std::io::Error::other in many placesNick Mathewson2025-05-152-8/+3
| | | | | | | The `IoError::other` function is an easier way to say `IoError::new(IoErrorKind::Other, ...)`. It's been around since 1.74, but clippy started warning about the more verbose version in 1.87.
* All crates: bump rust-version to 1.83.Nick Mathewson2025-05-131-1/+1
|
* Merge branch 'windows' into 'main'Jim Newsome2025-05-061-0/+1
|\ | | | | | | | | fs-mistrust: fix build on non-unix systems See merge request tpo/core/arti!2962
| * 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.
* | release: Bump versions of non tor/arti crates.Wesley Aptekar-Cassels2025-05-011-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-{arti-,tor-} crates are: ``` ./maint/list_crates | rg -v '^(tor|arti)' oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret fs-mistrust safelog retry-error ``` Of these, only hashx and fs-mistrust have changed, as per: ``` ./maint/changed_crates -v "arti-v$LAST_VERSION" 2>&1 >/dev/null | grep -i "no change" | grep -v '\(tor\|arti\)-' ``` So these were updated with: ``` ./maint/bump_nodep hashx fs-mistrust ```
* Merge branch 'android-build' into 'main'wesleyac2025-04-032-3/+29
|\ | | | | | | | | fix builds for Android See merge request tpo/core/arti!2824
| * fix builds for AndroidYaksh Bariya2025-03-032-3/+29
| | | | | | | | | | | | | | 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.
* | Bump the versions of the non-{arti-,tor-} crates.Gabriela Moldovan2025-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-{arti-,tor-} crates are: ``` ./maint/list_crates | rg -v '^(tor|arti)' oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret fs-mistrust safelog retry-error ``` We split them in the following categories: * crates with no changes (no version bumps): ``` maint/changed_crates -v "arti-v$LAST_VERSION" 2>&1 >/dev/null | grep -i "no change" | grep -v '\(tor\|arti\)-' oneshot-fused-workaround: No change. slotmap-careful: No change. fslock-guard: No change. caret: No change. retry-error: No change. ``` * crates that only have non-functional changes (bump the patch version): - test-temp-dir - equix - fs-mistrust - safelog * crates where APIs were broken (bump minor): - hashx (`RngCore` impl for `SipRand`) The bumps from this commit were created using this script: ``` PATCH=" test-temp-dir equix fs-mistrust safelog " for crate in $PATCH; do cargo set-version --bump patch -p $crate; done MINOR=" hashx " for crate in $MINOR; do cargo set-version --bump minor -p $crate; done ```
* | fix compiling fs-misstrust on tvOSyaucp2025-03-264-12/+28
|/
* Bump minor version of fs-mistrustIan Jackson2025-02-071-1/+1
| | | | Fixes #1841.
* fs-mistrust: bump minor version, and in-tree depsIan Jackson2025-02-061-1/+1
| | | | | | | | | | | | There are new features. cargo set-version --offline --bump minor -p fs-mistrust Actually, I have discovered by diffing that some methods now take `&self` where previously they took `self`. This will need a further bump to the fs-mistrust version and a fix to the changelog. I will do that. Filed blocker ticket #1841 for it.
* Upgrade to dirs 6Ian Jackson2025-02-051-1/+1
| | | | No code changes needed.
* fix: fix typosDimitris Apostolou2025-01-301-1/+1
|
* fs-mistrust: document that follow_final_links is not insecureNick Mathewson2025-01-281-0/+4
| | | | | Since it makes an exception, we need to be clear about the exceptions that it _doesn't_ make.
* fs-mistrust: link to documentation about "obeying constraints"Nick Mathewson2025-01-281-5/+5
| | | | | | Since "obeying the constraints of a FileAccess" is a term of art, this commit introduces links from the places where it is used to the place where it is defined.
* fs-mistrust: Fix test compilation on windows.Nick Mathewson2025-01-161-1/+2
| | | | | | | | | `std::os::unix::fs::MetadataExt` was indeed the right trait to import, but it doesn't exist on non-unix platforms. This is another bugfix on !2707. It should retain the fix of !2717. I've confirmed that it builds on Windows and passes tests on Linux and Mac.
* Fix: Tests fails to run on macoshhamud2025-01-161-5/+5
|
* file_access: Refactor APIs to consume self.Nick Mathewson2025-01-141-7/+16
| | | | | This approach makes it even less likely for people to store a FileAccess for repeated use.
* file_access: Make link-following behavior explicitly controlled.Nick Mathewson2025-01-141-8/+38
|
* Documentation fixes from GabiNick Mathewson2025-01-141-5/+3
|
* fs-mistrust: Try more to explain what FileAccess is for.Nick Mathewson2025-01-141-3/+7
|
* fs-mistrust: Follow symlinks when using file-access outside a CheckedDir.Nick Mathewson2025-01-141-9/+98
| | | | | | When we're not bound to a CheckedDir, it doesn't make sense to forbid following symlinks, so long as their targets are also sensible.
* fs-mistrust: Add FileAccess for Verifier (and Mistrust).Nick Mathewson2025-01-142-9/+42
|
* 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: Add ability to create files with chosen mode.Nick Mathewson2025-01-141-10/+117
|
* fs-mistrust: Clean up documentation.Nick Mathewson2025-01-141-15/+13
|
* fs-mistrust: Move file access methods on CheckedDir to FileAccess.Nick Mathewson2025-01-142-69/+168
| | | | | These are the methods which we'd like to give new options in #1746; we can move other methods later if we want to.
* fs-mistrust: Define a (stub) FileAccess type.Nick Mathewson2025-01-143-0/+38
| | | | | We're going to move functionality and configuration functions here to implement #1746.
* fs-mistrust::CheckedDir: Refactor some common code.Nick Mathewson2025-01-141-22/+32
|