summaryrefslogtreecommitdiff
path: root/crates/fs-mistrust
Commit message (Collapse)AuthorAgeFilesLines
* Bump patchlevel versions on non-{tor/arti} crates.Nick Mathewson2024-04-021-1/+1
| | | | | | | | | | | | | | | | These have all had backward-compatible changes. Generated with: ``` cargo set-version --bump patch -p fs-mistrust cargo set-version --bump patch -p test-temp-dir cargo set-version --bump patch -p fslock-guard cargo set-version --bump patch -p hashx cargo set-version --bump patch -p equix cargo set-version --bump patch -p caret cargo set-version --bump patch -p safelog cargo set-version --bump patch -p retry-error ```
* Run maint/add_warning.Nick Mathewson2024-03-138-0/+8
|
* Fix typos in doc commentsTobias Stoeckmann2024-03-062-2/+2
|
* Fix typos in commentsTobias Stoeckmann2024-03-061-1/+1
|
* fs-mistrust: Introduce a fn display_lossyIan Jackson2024-03-051-2/+9
| | | | | We're going to tell clippy to forbid Path::display. But we can't have the PathExt from tor-basic-utils, here.
* Merge branch 'deny-unchecked-duration-substraction' into 'main'Ian Jackson2024-03-051-0/+1
|\ | | | | | | | | | | | | deny clippy::unchecked_duration_subtraction Closes #1304 See merge request tpo/core/arti!2008
| * deny clippy::unchecked_duration_subtractiontrinity-1686a2024-02-291-0/+1
| |
* | Bump patchlevel (not dependents) on crates with trivial changes.Gabriela Moldovan2024-03-041-1/+1
|/ | | | | | | | | | | | | | This includes: ``` fs-mistrust tor-linkspec tor-chanmgr ``` Done with ``` ./maint/bump_nodep fs-mistrust tor-linkspec tor-chanmgr ```
* educe: Use std's default for enums where default variant is unitIan Jackson2024-02-122-10/+6
| | | | | | | | | | | | | Since Rust 1.66, std's default works properly for enums, provided that the default variant is a unit. Review all uses of `#[educe(default)]` on enums and replace them with std where possible, which is most of them. In 1.66 and later, std's `#[derive(Default)]` doesn't infer any generic bounds on the derived impl, where it's an enum - since the unit variant can always be constructed. So this change doesn't add any generic bounds and is not API-visible.
* Merge branch 'delete-semvers' into 'main'Ian Jackson2024-02-051-2/+0
|\ | | | | | | | | Remove all semver.md files to start a fresh release round See merge request tpo/core/arti!1957
| * Remove all semver.md files to start a fresh release roundIan Jackson2024-02-051-2/+0
| |
* | Bump patch versions *with* dependency updateIan Jackson2024-02-051-1/+1
|/ | | | | | | This crate has had new features added. It's 0.x. So bump in-tree dependencies' references: fs-mistrust
* fs_mistrust: Provide CheckedDir::make_secure_dirIan Jackson2024-01-292-0/+19
| | | | | | state_dir wants this, to descend into subdirectories. I think the implementation could be improved - see the TODO.
* fs_mistrust: Expose CheckedDir::verifierIan Jackson2024-01-252-2/+3
| | | | | | | | | I'm not sure why this isn't public. It seems like an obviously reasonable transformation. If I as author of !1927 had been an external contributor, I could have worked around the lack of .make_secure_directory() if .verifier() had existed. So I think exposing it would be useful.
* Patchlevel version bumps in preparation for 1.1.12.Nick Mathewson2024-01-091-1/+1
| | | | | | | | | | | | | This crate doesn't have a meaningful public API, so it just gets a patchlevel bump: arti These crates had nonbreaking changes, and get a patchlevel bump: tor-rtcompat fs-mistrust tor-llcrypto tor-cert
* fs-mistrust: Explain where a Verifier comes fromIan Jackson2023-12-131-0/+2
|
* upgrade to toml 0.8.8Nick Mathewson2023-12-051-1/+1
|
* Remove semver.md files.Nick Mathewson2023-12-041-1/+0
|
* Bump patchlevel versions in preparation for releaseNick Mathewson2023-12-041-1/+1
| | | | | | | | | | | | | | | These crates had backward-compatible changes, and get a patchlevel bump only: fs-mistrust tor-error tor-config tor-rtcompat tor-rtmock This crate exposes no non-CLI APIs, and gets a patchlevel bump only: arti
* In every crate, change rust-version to 1.70.Nick Mathewson2023-11-281-1/+1
|
* fs-mistrust: Add read_directory and remove_file to CheckedDir.Nick Mathewson2023-11-272-0/+143
| | | | Closes #1117.
* Bump patchlevel (not dependents) on crates with trivial changesNick Mathewson2023-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes: ``` tor-basic-utils caret fs-mistrust safelog retry-error tor-events tor-units tor-geoip tor-rtcompat tor-rpcbase tor-protover tor-socksproto tor-checkable tor-congestion tor-persist tor-circmgr arti-rpcserver arti-config arti-hyper arti-bench arti-testing tor-consdiff ```
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-238-0/+8
|
* Run add_warnings on all files.Nick Mathewson2023-08-041-2/+2
|
* Remove semver.md files now that 1.1.7 is out.Nick Mathewson2023-08-011-1/+0
|
* Increment patchlevel versions of crates with minor changesNick Mathewson2023-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates are at version 0.x.y, so we don't need to distinguish new-feature changes from other changes: ``` tor-basic-utils fs-mistrust tor-error tor-geoip tor-checkable tor-linkspec tor-netdoc tor-netdir tor-persist tor-ptmgr tor-hsservice ``` This crate has a breaking change, but only when the semver-breaking feature `experimental-api` is enabled: ``` tor-config ``` This crate is at version 1.x.y, but has no new public APIs, and therefore does not need a minor version bump: ``` arti ```
* Run cargo +nightly fmt to format many let ... else ...Ian Jackson2023-07-241-4/+9
| | | | | | | | | | | rustfmt has grown opinions about how let ... else ... ought to be formatted. They don't always agree with our previous manual decisions. I think our policy is to always insist on rustfmt. When that version of rustfmt hits stable, our CI will start to fail for everyone. (Right now this discrepancy just causes trouble for contributors who are using nightly by default.)
* Update pwd-grp to 0.1.1 to fix MacOS build etc.Ian Jackson2023-07-201-1/+1
| | | | This also gets rid of a duplicate copy of derive-adhoc.
* fs-mistrust: Run rustfmt to apply deferred formatting churnIan Jackson2023-07-141-10/+10
|
* fs-mistrust: In a test, simplify env var handlingIan Jackson2023-07-141-17/+10
|
* fs-mistrust: users: Use OsStr and OsString a lot lessIan Jackson2023-07-141-13/+23
| | | | | | | | We don't use OsString now except where it appears in our public API, or where we get it from std::env. Moving the `use` statements into the use sites enabled me to see that I had found all the places I wanted to change.
* fs-mistrust: Remove a now-unneeded suppressionIan Jackson2023-07-141-1/+0
| | | | This function is actually (properly) fallible now.
* fs-mistrust: forbid unsafe codeIan Jackson2023-07-141-0/+8
|
* fs-mistrust: Replace a direct libc call in a testIan Jackson2023-07-141-1/+1
|
* fs-mistruct: Abolish some now-unneeded mutsIan Jackson2023-07-141-26/+25
| | | | | MockPwdGrpProvider has internal mutability and is Sync, so its add functions take &self.
* fs-mistrust: Use pwd-grp's getgroups functionIan Jackson2023-07-141-24/+1
| | | | | This gets rid of some unsafe code here, with doubtful error handling, in favour of the unit-tested version in pwd-grp.
* fs-mistruct: switch from users to pwd-grpIan Jackson2023-07-142-42/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | users is unmaintained. pwd-grp is the crate I have just written to replace it. In this commit: Change the cargo dependency and imports. Replace the cacheing arrangements. users has a built-in cache; pwd-grp doesn't. Now, instead of cashing individual lookups, we cache the trusted user and trusted gid calculation results. This saves on some syscalls, and is also more convenient to write. (Mocking is still done via the dependency.) Many systematic consequential changes of details: * The entrypoint names to the library are different: pwd-grp uses the names of the corresponding Unix functions. * pwd-grp's returned structs are transparent, so we don't call accessors for .uid(), .name(), etc. * pwd-grp's methods are much more often fallible (returning io::Result<Option<...>) * We're using the non-UTF-8 pwd-grp API, which means we must use turbofish syntax in some places. * The mocking API is a bit different.
* fs-mistrust: Introduce tempoary PwdGrpProvider aliasIan Jackson2023-07-141-4/+8
| | | | | This allows us to change a number of trait bounds in advance, reducing noise in the next commit.
* fs-mistrust: impl Hash for TrustedUser and TrustedGroup (config)Ian Jackson2023-07-142-2/+3
|
* fs-mistrust: users: tests: Introduce mock_users etc.Ian Jackson2023-07-141-25/+36
| | | | | | | | | | Add some wrapper functions for convenience. The pwd-grp crate has a richer and more faithful, but not so convenient, way of creating dummy user/group entries. Also the type names are all going to change. Doing this now reduces churn.
* fs-mistrust: users: Make several functions fallibleIan Jackson2023-07-142-26/+41
| | | | | | | | | The actual underlying operations here *are* fallible. The `users` crate hides those errors in several cases. (Failures are very rare (at least unless NIS is involved), so this is not of much practical import, but it's going to be necessary when we use the more careful pwd-grp crate.
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-108-0/+9
|
* Run add_warning to remove `missing_panics_doc` deny.Nick Mathewson2023-07-061-1/+0
| | | | Closes #950.
* Bump versions on crates with nonfunctional changesNick Mathewson2023-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates have had nonfunctional changes only, mostly due to !1271, or ac90cb7500f2f108, or documentation changes: crates that depend on them do not require a version bump. ``` arti-bench arti-config arti-hyper arti-testing caret fs-mistrust retry-error tor-async-utils tor-basic-utils tor-chanmgr tor-checkable tor-congestion tor-consdiff tor-events tor-guardmgr tor-persist tor-protover tor-ptmgr tor-rtcompat tor-rtmock tor-units ```
* lints: Run maint/add_warning to actually apply new lintsIan Jackson2023-06-211-0/+2
|
* Bump crate versions in preparation for v1.1.5 release.Nick Mathewson2023-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generated with the following commands: ``` cargo set-version --bump minor -p tor-cell cargo set-version --bump minor -p tor-linkspec cargo set-version --bump minor -p tor-proto cargo set-version --bump minor -p tor-netdoc cargo set-version --bump minor -p tor-circmgr cargo set-version --bump patch -p tor-cert cargo set-version --bump patch -p tor-basic-utils cargo set-version --bump patch -p tor-rpcbase cargo set-version --bump patch -p tor-llcrypto cargo set-version --bump patch -p tor-hscrypto cargo set-version --bump patch -p tor-checkable cargo set-version --bump patch -p tor-async-utils cargo set-version --bump patch -p caret cargo set-version --bump patch -p fs-mistrust cargo set-version --bump patch -p safelog cargo set-version --bump patch -p retry-error cargo set-version --bump patch -p tor-error cargo set-version --bump patch -p tor-config cargo set-version --bump patch -p tor-events cargo set-version --bump patch -p tor-units cargo set-version --bump patch -p tor-rtcompat cargo set-version --bump patch -p tor-rtmock cargo set-version --bump patch -p tor-protover cargo set-version --bump patch -p tor-bytes cargo set-version --bump patch -p tor-socksproto cargo set-version --bump patch -p tor-consdiff cargo set-version --bump patch -p tor-netdir cargo set-version --bump patch -p tor-congestion cargo set-version --bump patch -p tor-persist cargo set-version --bump patch -p tor-chanmgr cargo set-version --bump patch -p tor-ptmgr cargo set-version --bump patch -p tor-guardmgr cargo set-version --bump patch -p tor-dirclient cargo set-version --bump patch -p tor-dirmgr cargo set-version --bump patch -p tor-hsclient cargo set-version --bump patch -p tor-hsservice cargo set-version --bump patch -p arti-client cargo set-version --bump patch -p arti-rpcserver cargo set-version --bump patch -p arti-config cargo set-version --bump patch -p arti-hyper cargo set-version --bump patch -p arti cargo set-version --bump patch -p arti-bench cargo set-version --bump patch -p arti-testing ```
* Revise all XXXXs from fixup-featuresNick Mathewson2023-05-151-5/+1
|
* Run fixup-features _with_ annotations.Nick Mathewson2023-05-151-0/+4
| | | | | This litters our Cargo.toml files with "XXX" entries that we should fix.
* Run fixup-features --no-annotate for initial Cargo.toml fixes.Nick Mathewson2023-05-151-0/+1
| | | | | | | | | This does the following: - Gives every crate a `full`. - Cause every `full` to depend on `full` from the lower-level crates. - Makes every feature listed _directly_ in `experimental` depend on `__is_experimental`.
* Increment crate versions.Nick Mathewson2023-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because of the errorkind bumps, we're calling this a breaking change in everything lower-level than `arti`. Generated with: ``` cargo set-version -p tor-basic-utils --bump minor cargo set-version -p tor-async-utils --bump minor cargo set-version -p caret --bump minor cargo set-version -p fs-mistrust --bump minor cargo set-version -p safelog --bump minor cargo set-version -p retry-error --bump minor cargo set-version -p tor-error --bump minor cargo set-version -p tor-config --bump minor cargo set-version -p tor-events --bump minor cargo set-version -p tor-units --bump minor cargo set-version -p tor-rtcompat --bump minor cargo set-version -p tor-rtmock --bump minor cargo set-version -p tor-rpcbase --bump minor cargo set-version -p tor-llcrypto --bump minor cargo set-version -p tor-protover --bump minor cargo set-version -p tor-bytes --bump minor cargo set-version -p tor-hscrypto --bump minor cargo set-version -p tor-socksproto --bump minor cargo set-version -p tor-checkable --bump minor cargo set-version -p tor-cert --bump minor cargo set-version -p tor-linkspec --bump minor cargo set-version -p tor-cell --bump minor cargo set-version -p tor-proto --bump minor cargo set-version -p tor-netdoc --bump minor cargo set-version -p tor-consdiff --bump minor cargo set-version -p tor-netdir --bump minor cargo set-version -p tor-congestion --bump minor cargo set-version -p tor-persist --bump minor cargo set-version -p tor-chanmgr --bump minor cargo set-version -p tor-ptmgr --bump minor cargo set-version -p tor-guardmgr --bump minor cargo set-version -p tor-circmgr --bump minor cargo set-version -p tor-dirclient --bump minor cargo set-version -p tor-dirmgr --bump minor cargo set-version -p tor-hsclient --bump minor cargo set-version -p tor-hsservice --bump minor cargo set-version -p arti-client --bump minor cargo set-version -p arti-rpcserver --bump minor cargo set-version -p arti-config --bump minor cargo set-version -p arti-hyper --bump minor cargo set-version -p arti --bump patch cargo set-version -p arti-bench --bump patch cargo set-version -p arti-testing --bump patch ```