Commit Graph

4325 Commits

Author SHA1 Message Date
Nick Mathewson 8b6f4cc69d Update README.md files with "readmes" tool. 2022-08-31 11:08:03 -04:00
Nick Mathewson 6338e571dd Changelog blurb 2022-08-31 11:06:18 -04:00
Nick Mathewson 8eb1fd4a6b Bring changelog up-to-date. 2022-08-31 10:37:12 -04:00
Nick Mathewson 77cb5acceb Merge branch 'compact_home_2' into 'main'
Represent the home directory as ${HOME} or %UserProfile%

Closes #555

See merge request tpo/core/arti!700
2022-08-31 13:57:11 +00:00
Nick Mathewson a9f19b0045 Use anonymize_home() when displaying various messages.
Closes #555
2022-08-31 09:38:35 -04:00
Nick Mathewson 7888ca09d2 fs-mistrust: Add a `anonymize_home` extension fn for Path.
This function transforms `/home/nickm/.config` to
`${HOME}/.config/`, so that we can expose the username less in our
logs.
2022-08-31 09:38:09 -04:00
Nick Mathewson 210c8f883c Merge branch 'ahf/557-mistrust-fixes-3' into 'main'
Add AppVeyor config (but do not enable it) and disable a few tests for Windows

See merge request tpo/core/arti!705
2022-08-31 13:25:38 +00:00
Nick Mathewson 8d6a1ea6ec Merge branch 'refactor-anyhow-arti-crate' into 'main'
Remove `anyhow` from `tor-config` crate

See merge request tpo/core/arti!707
2022-08-31 13:14:46 +00:00
Nick Mathewson 60e1a5c400 Merge branch 'upgrade_2022_0830' into 'main'
Upgrade and update dependencies in preparation for release.

See merge request tpo/core/arti!703
2022-08-31 13:06:01 +00:00
Ian Jackson f9cc603474 Merge branch 'label_expermintal' into 'main'
Mark a few APIs as experimental in docs.

See merge request tpo/core/arti!706
2022-08-31 11:53:29 +00:00
Nick Mathewson 167408050f check_licenses: List license for tinystr 2022-08-30 20:09:19 -04:00
Nick Mathewson f2699cb715 Run cargo update in preparation for release. 2022-08-30 20:09:19 -04:00
Nick Mathewson db50d57880 Upgrade serial_test in preparation for release. 2022-08-30 20:09:19 -04:00
Nick Mathewson 79860041fe Upgrade statrs in preparation for release. 2022-08-30 20:09:19 -04:00
Nick Mathewson a07c4124b1 Mark a few APIs as experimental in docs.
For example, see
https://tpo.pages.torproject.net/core/doc/rust/arti/fn.run.html :
this isn't labeled as `experimental-api`, but it should be.

These APIs were found by poking around in the `arti` crate.
2022-08-30 17:48:50 -04:00
Alexander Færøy 5c3456ff88 Comment out docstring as it fails to compile on Windows.
This patch comments out a method call to `trust_group()` as this method
is not available on all platforms that Arti builds on right now and thus
fails to compile there.

I have added a comment that the given call is not available on non-Unix
like platforms.

See: tpo/core/arti#557.
2022-08-30 22:07:44 +02:00
Alexander Færøy a0bf6b1eeb Disable 3 tests in fs-mistrust.
This patch disables `readable_ok()`, `multiple_errors()`, and
`check_contents()` as they all rely on permission issues on groups being
detected properly which is not the case on Windows right now.

See: tpo/core/arti#557.
2022-08-30 22:06:47 +02:00
Alexander Færøy 8808367d6a Use `static-sqlite` as feature flag for AppVeyor builds.
See: tpo/core/arti#450.
2022-08-30 21:47:30 +02:00
Alexander Færøy 783ee1df79 Add AppVeyor configuration file.
See: arti#450
2022-08-30 21:47:26 +02:00
Ian Jackson 2061c920f2 Merge branch 'ahf/config-windows-tests' into 'main'
Fix Tests on Windows in Configuration Subsystem.

See merge request tpo/core/arti!696
2022-08-30 13:20:37 +00:00
Ian Jackson e2104e4cce tor-config: DisfavouredKey: Linkify Display 2022-08-30 13:24:06 +01:00
Ian Jackson 71122a61b6 tor-config: DisfavouredKey: Widen applicability of .to_string()
And linkify it.
2022-08-30 13:24:06 +01:00
Alexander Færøy 4c2fd18d35 Add documentation note on `to_string()` usage for DisfavouredKey. 2022-08-30 13:24:06 +01:00
Alexander Færøy 2f6ae1d5a1 Fix Tests on Windows in Configuration Subsystem.
This patch changes our `default_config()` test in `arti/src/cfg.rs` such
that we can define a number of known unrecognized options on different
platforms.

We mark the two keys "storage.permissions.trust_group" and
"storage.permissions.trust_user" as unknown on the Windows platform as
such features is not available using the ordinary Unix UID concept.

This patch also publicly exposes the `tor_config::load::DisfavouredKey`
and `tor_config::load::PathEntry` types and marks them as
non-exhaustive.

See: tpo/core/arti#450.
2022-08-30 13:24:06 +01:00
Nick Mathewson fa687a4c18 More changelog entries, from semver.md files. 2022-08-30 08:18:30 -04:00
Ian Jackson 652ada2a4a Merge branch 'sighup' into 'main'
Sighup

See merge request tpo/core/arti!702
2022-08-30 11:59:03 +00:00
Nick Mathewson 5efc6f83b6 Merge branch 'ahf/557-mistrust-fixes' into 'main'
Help fs-mistrust tests on their way on Windows

See merge request tpo/core/arti!701
2022-08-29 16:24:09 +00:00
Alexander Færøy 8668bd7bc9 Use `expect()` instead of `unwrap()` in `mistrust_build()`.
See: tpo/core/arti#557.
2022-08-29 16:40:00 +02:00
Alexander Færøy d208706280 Refactor the construction of the `Mistrust` type in tests.
This patch refactors how we construct the `Mistrust` type in the tests
found in the fs-mistrust crate such that it is possible to construct an
instance of the `Mistrust` type using a set of operations available via
the `MistrustBuilder`'s methods.

We handle some of the portability issues found while testing this code
on Windows in the convenience function `mistrust_build()` instead of
having duplicated code in multiple test cases.

See: tpo/core/arti#557.
2022-08-29 16:22:57 +02:00
Nick Mathewson 5bd761ed97 Start on a 1.0.0 changelog 2022-08-29 09:41:57 -04:00
Alexander Færøy 514aaf41b8 Document in link_rel() why we do not support symlinks on Windows.
This patch adds a comment to the `link_rel()` function in fs-mistrust to
explain why we ignore symlink creation on the Windows platform.

See: tpo/core/arti#557.
2022-08-29 15:29:25 +02:00
Arturo Marquez 7d3d24cddf
Remove `anyhow` from `tor-config` crate 2022-08-28 18:07:53 -05:00
trinity-1686a 8510ba534d small refactoring to reduce duplicaiton of config reloading 2022-08-27 14:12:02 +02:00
trinity-1686a 748d5aea48 connect SIGHUP to watch_cfg 2022-08-27 14:12:02 +02:00
Nick Mathewson 7a3fec6fec WIP: listen for sighups and reconfigure? 2022-08-26 15:44:04 -04:00
Alexander Færøy 7b5ee8423b Disable fs-mistrust's simple_cases() unit test on non-Unix.
This patch disables the simple_cases() test on non-Unix platforms and
hides the LinkType type import on non-Unix where we won't be testing
symbolic link features.

See: tpo/core/arti#557.
2022-08-26 21:34:49 +02:00
Nick Mathewson 2c4a176e66 Add functionality to listen for SIGHUPs. 2022-08-26 15:33:56 -04:00
Alexander Færøy c3928bfe6c Fix compilation of tests for Windows.
This patch allows us to compile the fs-mistrust tests on Windows where
the `trust_no_group_id()` method is unavailable.

See: tpo/core/arti#557.
2022-08-26 21:33:40 +02:00
Alexander Færøy fa1b77642f Mark fs-mistrust's link_rel() and link_abs() as Unix-only.
Since we are not going to test symlink creation on Windows we remove
this code from the testing module.

See: tpo/core/arti#557.
2022-08-26 21:32:12 +02:00
Alexander Færøy edec8f3ecd Mark the repeats and looping tests in fs-mistrust as Unix-only.
See: tpo/core/art#557.
2022-08-26 21:30:20 +02:00
Nick Mathewson 35c2a5dc62 Merge branch 'bridge_writeup' into 'main'
Overview of issues with bridges in 1.1.0

See merge request tpo/core/arti!686
2022-08-26 18:20:49 +00:00
Nick Mathewson 8f7149931e Qualify a few statements about bridges. 2022-08-26 13:42:38 -04:00
Nick Mathewson 7700ee3892 Remove first person: Now my opinions are facts. ;) 2022-08-26 13:38:52 -04:00
Nick Mathewson a1a6cee333 Merge branch 'fs_mistrust_test_verbatim' into 'main'
fs-mistrust: Try to handle verbatim prefixes in test.

See merge request tpo/core/arti!699
2022-08-26 17:21:34 +00:00
Nick Mathewson c1f64144b3 fs-mistrust: Try to handle verbatim prefixes in test.
We have a test that tries to check that our outputs are the same as
those from `std::fs::canonicalize`.  But on Windows, they aren't:
There, `canonicalize` also puts path prefixes into a "Verbatim"
form.

This patch tries to replicate that behavior for the test only.  If
we find that it's unreliable, though, our best bet is probably to
revise or disable this check on Windows, rather than chasing
compatibility with `GetFinalPathNameByHandle`.

Should fix part of #557.
2022-08-26 10:56:32 -04:00
Ian Jackson 3ea05c981d Merge branch 'fs-mistrust-by-component' into 'main'
fs-mistrust: Handle windows prefixes specially.

See merge request tpo/core/arti!698
2022-08-26 14:50:51 +00:00
Ian Jackson ca4ca75ede fs-mistrust: Clarify comment on `stack` 2022-08-26 14:14:40 +00:00
Nick Mathewson 5e7a62dff2 fs-mistrust: Handle windows prefixes specially.
On Windows, paths can have a "prefix", like `C:` or
`\\server\share`.  Attempts to get metadata for these prefixes
appear to fail with `ERROR_INVALID_FUNCTION`, since they are not
files.

This patch teaches fs-mistrust about prefixes on Windows, and tells
it that attempts to find their metadata are allowed to fail.

Doing this may solve part of #557.
2022-08-26 09:43:08 -04:00
Ian Jackson 56fd5ac779 Merge branch 'safelog_more' into 'main'
Apply safelog to more of the things that we log

See merge request tpo/core/arti!693
2022-08-26 13:20:00 +00:00
Ian Jackson d06e295a3a Merge branch 'safelog_note' into 'main'
First draft of "what is sensitive" document

See merge request tpo/core/arti!687
2022-08-26 13:10:53 +00:00