| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
We're just using fslock-guard now.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We no longer do replay log locking in IptManager::new. Instead, we
rely on the acquire_instance call in OnionService::launch, which ends
up with ipt_mgr getting an InstanceHandle (which contains a lock
guard).
OnionServiceStateMgr is abolished; it existed to deal with the
generics in the tor_persist::StateMgr API. state_dir has no
generics (other than the T being loaded/stored).
Many places (structs and argument lists) now have state_dir types
which embody a path (or a CheckeDir) along with a lock, rather than
separate path+lock+mistrust.
The creation/startup code uses the new calls from state_dir.
Other more minor changes:
- StartupError::StateDirectoryInaccessible contains tor_persist::Error
- test::create_storage_handles_from_state_dir changed and renamed,
from _from_state_mgr.
- replay::PersistFile's (separate) file lock is now fslock_guard's
|
| |
|
|
|
| |
Introduce the crate, move the code motion, and make minimal necessary
changes.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
This method combined two things:
1. the lifetime guard API
2. creation of a subdirectory.
2 is available in raw form too, but not 1. So rename the combined
method to .subdir_used_by and implement it in terms of a new .used_by
which doesn't make a subdirectory.
|
| |
|
|
| |
Fixes #1207.
|
| | |
|
| |
|
|
|
| |
We're going to want to do more things here, all of which want the same
error handling.
|
| |
|
|
|
| |
This combines two logically-parallel options. Also, it provides us a
place to put another piece of information we want in a moment.
|
| | |
|
| | |
|
| |
|
|
| |
We now have more fine-grained allows.
|
| |
|
|
|
| |
Deciding what to do about this *is* a MUST, but maybe we'll downgrade
that ticket.
|
| |
|
|
| |
This *is* a MUST.
|
| |
|
|
| |
This isn't a MUST.
|
| | |
|
| | |
|
| |
|
|
|
| |
This is to prevent current use of the same directory of replay logs by
different instances.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
This ought to have the hash algorithm name in it or we'll have trouble
if we want to change the hash algorithm in the future. (Strictly, we
could just choose a different magic but the string was rather short.)
Add a newline, which is often convenient in file headers.
And "onion" to mean "onion swervice" is improper.
|
| |
|
|
| |
Make `#[cfg(target_family = "unix")]` appear only once.
|
| |
|
|
|
|
| |
(The actual false positive rate for these cases is very small, since
the filters are very much not full. I haven't been able to hit one
in hours of looping.)
|
| | |
|
| | |
|
|
|
See comments for design notes.
|