[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor] 01/03: sandbox: Allow my-consensus-* files for an authority
This is an automated email from the git hooks/post-receive script.
dgoulet pushed a commit to branch main
in repository tor.
commit 726e9ec0a3bd7bda889f9da87a226451315baeda
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
AuthorDate: Tue Jan 10 09:02:13 2023 -0500
sandbox: Allow my-consensus-* files for an authority
Fixes #40729
Signed-off-by: David Goulet <dgoulet@xxxxxxxxxxxxxx>
---
changes/ticket40729 | 3 +++
src/app/main/main.c | 9 +++++++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/changes/ticket40729 b/changes/ticket40729
new file mode 100644
index 0000000000..1c2d43d14f
--- /dev/null
+++ b/changes/ticket40729
@@ -0,0 +1,3 @@
+ o Minor bugfixes (sandbox, authority):
+ - With the sandbox enabled, allow to write "my-consensus-{ns|microdesc}" and
+ to rename them as well. Fixes bug 40729; bugfix on 0.3.5.1-alpha.
diff --git a/src/app/main/main.c b/src/app/main/main.c
index 7fb92c59db..838e129d04 100644
--- a/src/app/main/main.c
+++ b/src/app/main/main.c
@@ -924,8 +924,8 @@ sandbox_init_filter(void)
if (authdir_mode(options)) {
OPEN_DATADIR("approved-routers");
- OPEN_CACHEDIR_SUFFIX("my-consensus-microdesc", ".tmp");
- OPEN_CACHEDIR_SUFFIX("my-consensus-ns", ".tmp");
+ OPEN_DATADIR_SUFFIX("my-consensus-microdesc", ".tmp");
+ OPEN_DATADIR_SUFFIX("my-consensus-ns", ".tmp");
}
if (options->ServerDNSResolvConfFile)
@@ -1004,6 +1004,11 @@ sandbox_init_filter(void)
if (options->BridgeAuthoritativeDir)
RENAME_SUFFIX("networkstatus-bridges", ".tmp");
+ if (authdir_mode(options)) {
+ RENAME_SUFFIX("my-consensus-microdesc", ".tmp");
+ RENAME_SUFFIX("my-consensus-ns", ".tmp");
+ }
+
#define STAT_DATADIR(name) \
sandbox_cfg_allow_stat_filename(&cfg, get_datadir_fname(name))
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits