aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/or/config.c5
-rw-r--r--src/or/main.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index aa4c0079b..b346f6648 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -3747,6 +3747,11 @@ options_transition_allowed(const or_options_t *old,
"Sandbox is active");
return -1;
}
+ if (! opt_streq(old->DirPortFrontPage, new_val->DirPortFrontPage)) {
+ *msg = tor_strdup("Can't change DirPortFrontPage"
+ " while Sandbox is active");
+ return -1;
+ }
}
return 0;
diff --git a/src/or/main.c b/src/or/main.c
index dac178ade..3d109ec78 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -2848,6 +2848,11 @@ sandbox_init_filter(void)
NULL, 0
);
+ if (options->DirPortFrontPage) {
+ sandbox_cfg_allow_open_filename(&cfg,
+ tor_strdup(options->DirPortFrontPage));
+ }
+
RENAME_SUFFIX("fingerprint", ".tmp");
RENAME_SUFFIX2("keys", "secret_onion_key_ntor", ".tmp");
RENAME_SUFFIX2("keys", "secret_id_key", ".tmp");