aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2023-01-10 09:02:13 -0500
committerDavid Goulet <dgoulet@torproject.org>2023-01-10 09:02:13 -0500
commit726e9ec0a3bd7bda889f9da87a226451315baeda (patch)
tree4a6d6a06ecbb10a11c0caafe63b26e1c95dd979b /src/app
parent1d9166c8c915c14f67612ace8a9449aa3049c2f9 (diff)
downloadtor-726e9ec0a3bd7bda889f9da87a226451315baeda.tar.gz
tor-726e9ec0a3bd7bda889f9da87a226451315baeda.zip
sandbox: Allow my-consensus-* files for an authority
Fixes #40729 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/app')
-rw-r--r--src/app/main/main.c9
1 files changed, 7 insertions, 2 deletions
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))