]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
sandbox: Allow DirPortFrontPage unconditionally if it's set
authorNick Mathewson <nickm@torproject.org>
Tue, 27 May 2014 23:21:11 +0000 (19:21 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 27 May 2014 23:21:11 +0000 (19:21 -0400)
fixes 12114; bug not in any release.

Improves fix for 12028

src/or/main.c

index 8b79c42734eeb1948c11284d6072192a03cd90cc..a3be9a20df69cf37ab5dcc686bfeb60dff0365f2 100644 (file)
@@ -2870,6 +2870,11 @@ sandbox_init_filter(void)
     }
   }
 
+  if (options->DirPortFrontPage) {
+    sandbox_cfg_allow_open_filename(&cfg,
+                                    tor_strdup(options->DirPortFrontPage));
+  }
+
   // orport
   if (server_mode(get_options())) {
     sandbox_cfg_allow_open_filename_array(&cfg,
@@ -2905,11 +2910,6 @@ 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");