| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | tor-persist: state_dir: Add some missing Clone and Debug impls | Ian Jackson | 2024-02-01 | 1 | -5/+5 |
| | | |||||
| * | tor-persist: state_dir: Introduce way to get at underlying lock guard | Ian Jackson | 2024-02-01 | 1 | -3/+38 |
| | | | | | | | And export the type, so callers don't need to depend directly on fslock_guard; many callers will need to own the returned value, not do anything else with it. | ||||
| * | tor-persist: state_dir: Make the storage handle Send and Sync | Ian Jackson | 2024-02-01 | 1 | -2/+5 |
| | | |||||
| * | Merge branch 'lowercase-slugs' into 'main' | Ian Jackson | 2024-01-31 | 1 | -1/+4 |
| |\ | | | | | | | | | | | | | tor-keymgr: Lowercase the role when building the ArtiPath. Closes #1195 See merge request tpo/core/arti!1934 | ||||
| | * | tor-persist: Reduce nesting in check_syntax(). | Ian Jackson | 2024-01-31 | 1 | -6/+4 |
| | | | |||||
| | * | tor-persist: Reject slugs that contain uppercase characters. | Gabriela Moldovan | 2024-01-31 | 1 | -1/+6 |
| | | | | | | | | | | | | | | | The `slug` docs say slugs are not allowed to contain uppercase characters, so let's return an error if they do. Part of #1195 | ||||
| * | | tor-persist: state_dir: Fix a docs reference | Ian Jackson | 2024-01-31 | 1 | -1/+1 |
| | | | |||||
| * | | tor-persist: state_dir: Fix a leftover reference to `delete` | Ian Jackson | 2024-01-31 | 1 | -1/+1 |
| | | | | | | | | | This is now InstanceStateHandle::purge. | ||||
| * | | tor-persist: Add a test for Resource::InstanceState | Ian Jackson | 2024-01-31 | 1 | -0/+38 |
| | | | | | | | | | | | We should add more tests for these error representations but we want to rework these errors so let's not do all that now. | ||||
| * | | tor-hsservice: state_dir: Quote some strings in an error | Ian Jackson | 2024-01-31 | 1 | -1/+1 |
| | | | |||||
| * | | tor-hsservice: state_dir: Fix a wrong error string | Ian Jackson | 2024-01-31 | 1 | -1/+1 |
| | | | | | | | | | We use `/` to separate, not `+`. | ||||
| * | | tor-hsservice: state_dir: Fix a wrong comment | gabi-250 | 2024-01-31 | 1 | -1/+1 |
| | | | |||||
| * | | tor-hsservice: state_dir: Fix typo | gabi-250 | 2024-01-31 | 1 | -1/+1 |
| | | | |||||
| * | | state_dir: Deferred fmt churn | Ian Jackson | 2024-01-31 | 1 | -3/+1 |
| | | | |||||
| * | | state_dir: When comparing path, use official separators | Ian Jackson | 2024-01-31 | 1 | -1/+1 |
| | | | | | | | | | | | This would fix the tests on Windows I think ? (Tests which don't seem to run in routine CI AFAICT.) | ||||
| * | | state_dir: Use subdirectory rather than + notation | Ian Jackson | 2024-01-31 | 1 | -8/+9 |
| | | | | | | | | | As previously decided and documented. | ||||
| * | | state_dir: Break out make_secure_directory closure | Ian Jackson | 2024-01-31 | 1 | -4/+11 |
| | | | | | | | | | | | | | | | We're about to reuse this. This changes the Resource in the error to be more accurate, too. This will be more important as we add another call site. | ||||
| * | | state_dir: Introduce local PATH_SEPARATOR alias | Ian Jackson | 2024-01-31 | 1 | -2/+3 |
| | | | | | | | | | We're going to want this some more. | ||||
| * | | tor-persist: state_dir: Remove three unused allows | Ian Jackson | 2024-01-31 | 1 | -3/+0 |
| | | | |||||
| * | | tor-persist: state_dir: Test functionality that exists now | Ian Jackson | 2024-01-31 | 1 | -0/+106 |
| | | | |||||
| * | | tor-persist: state_dir: Enable rustfmt (formatting) | Ian Jackson | 2024-01-31 | 1 | -15/+14 |
| | | | | | | | | | Remaining formatting churn. | ||||
| * | | tor-persist: state_dir: Implement StateDirectory::new | Ian Jackson | 2024-01-31 | 1 | -1/+17 |
| | | | |||||
| * | | tor-persist: state_dir: Implement acquire_instance | Ian Jackson | 2024-01-31 | 2 | -7/+157 |
| | | | | | | | | | | | | | | | And also instance_peek_storage, which needs to share some code, so determined the shape of this implementation. Make StateDirectory have the (one) field we need. | ||||
| * | | tor-persist: state_dir: Implement InstanceStateHandle and StorageHandle | Ian Jackson | 2024-01-31 | 1 | -8/+89 |
| | | | | | | | | | | | | | | | | | | | | | These are the straightforward methods which, given a CheckedDir, perform the relevant operation. Make InstanceStateHandle have the necessary fields. Constructing an InstanceStateHandle is a bit complex and will come in a moment. | ||||
| * | | tor-persist: state_dir: Have instance id throw fmt::Error | Ian Jackson | 2024-01-31 | 1 | -5/+5 |
| | | | | | | | | | | | | | | | | | In practice, allowing Bug here was quite inconvenient for everyone. I think very few call sites will want to throw anything interesting. If they *do* want to cause an error, without panicking, they could write a syntactically invalid slug. | ||||
| * | | tor-persist: Error: Provide for handling LocalResourceAlreadyInUse | Ian Jackson | 2024-01-31 | 1 | -0/+5 |
| | | | | | | | | | | | state_dir doesn't support a "shared read-only" mode, so it needs an error. | ||||
| * | | tor-persist: Error: Provide for handling BadSlug | Ian Jackson | 2024-01-31 | 1 | -1/+24 |
| | | | | | | | | | | | | | | | Introduce a Bug variant. Then, use it for conversions from BadSlug. See the comment for why I think this is appropriate. | ||||
| * | | tor-persist: state_dir: Two API fixes | Ian Jackson | 2024-01-31 | 1 | -2/+2 |
| | | | | | | | | | | | | | | | | | You don't need to consume a Mistrust to get a CheckedDir - you use a Verifier and then something clones it for you. So StateDirectory::new should take &Mistrust. And instance_peek_storage needs T to be deserialisable! | ||||
| * | | tor-persist: state_dir: Rename InstanceStateHandle::purge (from delete) | Ian Jackson | 2024-01-31 | 1 | -2/+2 |
| | | | | | | | | | | | This is rather more serious than many deletions - it wipes out the whole directory. And this name goes better with purge_instances. | ||||
| * | | tor-persist: state_dir: Enable rustfmt | Ian Jackson | 2024-01-31 | 1 | -1/+0 |
| | | | | | | | | | The formatting will be normalised roughly as we go. | ||||
| * | | tor-persist: load_store: Add some tracing | Ian Jackson | 2024-01-31 | 1 | -3/+18 |
| | | | | | | | | | Now we get log messages about what we're reading/writing. | ||||
| * | | tor-persist: Fix a doc comment | Ian Jackson | 2024-01-31 | 1 | -1/+1 |
| |/ | |||||
| * | tor-persist: Document that slugs cannot start with '-'. | Gabriela Moldovan | 2024-01-31 | 1 | -1/+1 |
| | | |||||
| * | tor-persist: Make all Slugs non-empty. | Gabriela Moldovan | 2024-01-31 | 1 | -10/+13 |
| | | | | | | | | | This also removes a TODO regarding adding a `Nickname` type for representing `HsClientSpecifier` and `HsNickname` (we don't need it if `Slug`s are non-empty). Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1931#note_2990227 | ||||
| * | tor-persist: Forbid slugs from starting with a hyphen. | Gabriela Moldovan | 2024-01-31 | 1 | -1/+21 |
| | | |||||
| * | tor_persist::slug: Allow hyphens in Slugs. | Gabriela Moldovan | 2024-01-31 | 1 | -2/+3 |
| | | | | | | | | | The internal representation of `HsNickname` will soon be `Slug`, and nicknames can contain hyphens, so let's add `-` to the allowed charset. Part of #1092 | ||||
| * | slug: Provide BadSlug::EmptySlugNotAllowed | Ian Jackson | 2024-01-29 | 1 | -0/+12 |
| | | |||||
| * | Merge branch 'slug2' into 'main' | Ian Jackson | 2024-01-25 | 2 | -94/+62 |
| |\ | | | | | | | | | TryIntoSlug See merge request tpo/core/arti!1922 | ||||
| | * | state_dir: Remove a now-unused allow | Ian Jackson | 2024-01-25 | 1 | -1/+0 |
| | | | |||||
| | * | state_dir: Replace InstanceIdString with Slug and SlugRef | Ian Jackson | 2024-01-25 | 1 | -44/+14 |
| | | | | | | | | | And tidy up some of the docs to refer to the slug module. | ||||
| | * | state_dir: Abolish now-obsolete Slug trait rename | Ian Jackson | 2024-01-25 | 1 | -5/+3 |
| | | | |||||
| | * | slugs: Provide TryIntoSlug, and replace state_dir::Slug with it | Ian Jackson | 2024-01-25 | 2 | -47/+48 |
| | | | |||||
| * | | Merge branch 'slug4' into 'main' | gabi-250 | 2024-01-25 | 1 | -0/+5 |
| |\ \ | | | | | | | | | | | | | slug: Implement the AsRefs for Slug as well as for SlugRef See merge request tpo/core/arti!1929 | ||||
| | * | | slug: Implement the AsRefs for Slug as well as for SlugRef | Ian Jackson | 2024-01-25 | 1 | -0/+5 |
| | |/ | | | | | | | | | Otherwise you can't use &Slug where someone wants &impl AsRef<Path>, which is rather sad. | ||||
| * / | slug: Fix maint/check_doc_features | Ian Jackson | 2024-01-25 | 1 | -0/+2 |
| |/ | |||||
| * | tor_persist::slug: Abolish ForbiddenOnWindows on non-Windows | Ian Jackson | 2024-01-25 | 1 | -21/+9 |
| | | | | | | | | | | Abolish it, sprinkling cfg all over, rather than having it be uninhabited. See https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1912#note_2988746 https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1912#note_2988748 | ||||
| * | Introduce tor_persist::slug module | Ian Jackson | 2024-01-25 | 2 | -0/+397 |
| | | | | | | | | | | I need this for state_dir (#1163, !1853). I intend that this should be used for arti paths (#1092, #1193). See also #1195. Implements the spec in #1192 but doesn't connect it to anything yet. | ||||
| * | tor-persist: load_store: More documentation | Ian Jackson | 2024-01-24 | 1 | -3/+29 |
| | | |||||
| * | Fix doc comments. | Nick Mathewson | 2024-01-24 | 2 | -2/+2 |
| | | |||||
| * | tor-persist: state_dir: Implement the StorageHandle methods | Ian Jackson | 2024-01-24 | 1 | -6/+36 |
| | | | | | | You can't call these yet and there aren't any tests. But this demonstrates use of the previous refactoring. | ||||
