Commit Graph

3696 Commits

Author SHA1 Message Date
Ian Jackson 151d28c90f Run rustfmt following renaming
Split into its own commit to avoid churn in the rename commits.
2022-05-25 16:41:50 +01:00
Ian Jackson 0803296bd6 tor-config: Rename resolve_return_unrecognized, ..._ignore_...
As per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/529#note_2807077
2022-05-25 16:41:05 +01:00
Ian Jackson 9f426e2c57 tor-config: Rename "ignored" to "unrecognized" throughout
As per review comments
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/529#note_2807076
2022-05-25 16:40:02 +01:00
Ian Jackson e9538a7eef Merge branch 'no_nochange' into 'main'
DirMgr:: Remove Error::NoChange as redundant.

Closes #484

See merge request tpo/core/arti!532
2022-05-25 14:35:32 +00:00
Alex Xu (Hello71) 85b4b5620d fs-mistrust: allow symlinks to have any permissions 2022-05-25 10:27:45 -04:00
Alex Xu (Hello71) 4797c120d0 ci: set umask instead of ARTI_FS_DISABLE_PERMISSION_CHECKS 2022-05-25 10:27:45 -04:00
Ian Jackson 4b0459d204 Merge branch 'bug475' into 'main'
ConfigurationSources: Allow config files to be world-readable.

Closes #475

See merge request tpo/core/arti!528
2022-05-25 14:23:12 +00:00
Nick Mathewson bc3c9d475f Merge branch 'support_policy' into 'main'
Initial draft policy on supported platforms and dependencies

Closes #379

See merge request tpo/core/arti!513
2022-05-25 13:14:54 +00:00
Nick Mathewson 52a338a378 Merge branch 'socks-errors' into 'main'
reply socks error on more codepath

Closes #258

See merge request tpo/core/arti!531
2022-05-25 13:13:18 +00:00
Nick Mathewson 0caa5bcba5 DirMgr:: Remove Error::NoChange as redundant.
Now that the relevant functions now report changed/not-changed
status via a boolean out-parameter (see !527), there's no reason to
have a separate NoChanged error case.

Closes #484.
2022-05-25 08:58:37 -04:00
Nick Mathewson 3b837eb7f4 Typo fixes (automated with "typos"). 2022-05-24 19:21:12 -04:00
trinity-1686a 801380780f reply socks error on more codepath 2022-05-25 00:02:14 +02:00
Nick Mathewson 92f0f97fe8 Merge branch 'isolation-example' into 'main'
add example for Isolation

Closes #414

See merge request tpo/core/arti!524
2022-05-24 19:34:14 +00:00
eta 608d0cbcc2 Merge branch 'bug482' into 'main'
DirMgr: Stop load-from-cache process when there is no change.

Closes #482

See merge request tpo/core/arti!527
2022-05-24 19:33:42 +00:00
Ian Jackson 112cce10ba semvar_status: Document config changes 2022-05-24 20:17:23 +01:00
Ian Jackson 9c88158740 tor-config: Example for load module 2022-05-24 20:14:57 +01:00
Ian Jackson bb8e205b0d tor-config: Tests for ignored config key handling 2022-05-24 20:14:57 +01:00
Ian Jackson 09f26f2d68 tor-config: Track and (by default) warn on ignored config keys 2022-05-24 20:14:57 +01:00
Ian Jackson e1bc599db2 tor-config: Tests for support functions for tracking ignored keys 2022-05-24 20:14:57 +01:00
Ian Jackson 865ae13502 tor-config: Support functions for tracking ignored config keys
This turns out to need quite a complicated algorithm.
2022-05-24 20:14:57 +01:00
Ian Jackson 9e526aad7c Split TorClientConfig out of ArtiConfig, and Resolvable trait
This gets rid of `#[serde(flatten)]` which prevents serde_ignored (and
other kinds of introspection) from working properly.

The price is now that the toplevel has to deal with two configuration
objects.

The Resolvable trait is overkill right now, but is going to do More
Things in a moment.  In particular, we need the impl on tuples, so
that the whole config can be processed in one go.
2022-05-24 20:14:57 +01:00
Nick Mathewson 460117f2b0 Allow use of RetainMut, since we do not require Rust 1.61 yet. 2022-05-24 15:09:00 -04:00
Ian Jackson 687e5c369e tor-config: Introduce Builder trait and ConfigReolveError
We are going to need this for some generic code which is going to
appear shortly.  Having it produced by impl_standard_builder seems
best.  But that does mean being able to disable it, so extra stuff in
the macro.  Nothing uses this trait yet.

ConfigResolveError is not used now either, but will be in a moment.
2022-05-24 20:08:40 +01:00
Ian Jackson d15cc75821 arti tests: Introduce bld_tor variable
We are going to reorganise ArtiConfig to not contain a
TorClientConfig.  This test case's calls to bld.tor() will all need to
change.  Do this in advance to make that future commit more readable.
2022-05-24 20:08:40 +01:00
Ian Jackson fcdac71be7 tor-config: Add a lint allow
I don't understand why this isn't tripping all the time.  Maybe
because this is in a macro.  Anyway, I am going to add a new
invocation of this macro from within a test where, empirically, it
trips.
2022-05-24 20:08:40 +01:00
Nick Mathewson af54b99b40 Run "cargo update" in preparation for the next release. 2022-05-24 15:08:01 -04:00
Nick Mathewson f395c5d470 Start work on a changelog for 0.4.0 2022-05-24 15:05:57 -04:00
trinity-1686a 78b815e0d3 mention isolation is an advanced topic and most usage don't require implementing the trait 2022-05-24 18:25:32 +02:00
Nick Mathewson b055cc27f1 Merge branch 'configurable-mistrust' into 'main'
Make file permissions configurable via regular config mechanisms

Closes #465

See merge request tpo/core/arti!515
2022-05-24 15:19:20 +00:00
Ian Jackson 814faf6398 Apply clarifications to SupportPolicy.md from @Diziet 2022-05-24 15:13:54 +00:00
Nick Mathewson 5a5a828db6 ConfigurationSources: Allow config files to be world-readable.
Fixes #475.
2022-05-24 11:05:57 -04:00
Nick Mathewson 924cc380d4 Use serde attrs instead of manual impls 2022-05-24 10:54:02 -04:00
Nick Mathewson de3c7baa4c Note that fs-mistrust has broken semver. 2022-05-24 10:54:02 -04:00
Nick Mathewson 25c64db575 Apply fs-mistrust to logfile directories. 2022-05-24 10:54:02 -04:00
Nick Mathewson b1fc4bd03b Make fs-mistrust configurable from the top level.
This change requires a little refactoring of TorClientBuilder: now,
instead of enabling or disabling mistrust, it enables or disables
the decision to _override_ the mistrust in the config.
2022-05-24 10:54:02 -04:00
Nick Mathewson 12f2a47fcb Write custom serde impls for Trusted{User,Group}
We support all of the following (in TOML notation):

```
user = "rose"  # by name
user = 413     # by ID
user = false   # no user
user = ":current"  # A 'special' user.

user = { name: "rose" }
user = { id: 413 }
user = { special: ":none" }
user = { special: ":current" }
```
2022-05-24 10:54:02 -04:00
Nick Mathewson 9dd7b99de1 Add serde derives for MistrustBuilder.
The Group and User (de)serialization is pretty ugly, and I can't
vouch for the correcness of MistrustBuilder.  I will seek feedback
before I proceed.
2022-05-24 10:54:02 -04:00
Nick Mathewson 330582a142 fs-mistrust: Add Group and User types.
This will help make the actual configuration more serializable,
I hope.
2022-05-24 10:54:02 -04:00
Nick Mathewson 95200383b5 fs-mistrust: make Mistrust have a corresponding Builder type.
This is an approximately minimal revision to get Builder in place;
subsequent commits will clean up the API.
2022-05-24 10:54:02 -04:00
Nick Mathewson baa58daace fs-mistrust: rename fields
This renaming will make things slightly simpler for declaring a
builder.
2022-05-24 10:54:02 -04:00
Ian Jackson 85faa1c0f6 Merge branch 'upgrades-20220523' into 'main'
Update to newer sanitize-filename and tinystr.

See merge request tpo/core/arti!523
2022-05-24 13:22:01 +00:00
Ian Jackson dae2ccd692 Merge branch 'clippy_pass' into 'main'
Make clippy +nightly pass again

See merge request tpo/core/arti!522
2022-05-24 13:21:24 +00:00
Nick Mathewson 8e15c97f56 DirMgr: Stop load-from-cache process when there is no change.
Previously in !511 I had introduced a bug where, if there was an
error more serious than "no change", that error would keep us from
noticing that we had no change, and we'd loop until the safety
counter ran out.  Then we'd panic.

This commit fixes the bug by reintroducing the `changed` boolean --
this time as an outparam for the add_from_* methods.

Fixes #482.
2022-05-24 08:50:20 -04:00
trinity-1686a b279b09b0c add example for Isolation 2022-05-23 22:40:08 +02:00
Nick Mathewson c27b3cb701 Update to newer sanitize-filename and tinystr. 2022-05-23 16:02:50 -04:00
Nick Mathewson 90b8a927a3 Merge branch 'check-pid-squashed' 2022-05-23 13:08:03 -04:00
Jim Newsome 48e1c75584 chutney/teardown: validate that pid is set 2022-05-23 13:07:59 -04:00
Nick Mathewson 546ae3000e Resolve the new `derive_partial_eq_without_eq` lint.
It's a little overzealous sometimes, but it's mostly to the good.
2022-05-23 12:55:37 -04:00
Nick Mathewson 2f1803f4c6 Suppress clippy warnings in tor-basic-utils.
These are warnings that we've decided it's okay to suppress elsewhere.
2022-05-23 12:55:37 -04:00
Nick Mathewson aaa8bfcb53 Merge branch 'remove_dbgs' into 'main'
Remove dbg!()s in tor-config, and fix nightly CI

See merge request tpo/core/arti!516
2022-05-23 16:18:46 +00:00