aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-07-29 12:35:57 -0400
committerNick Mathewson <nickm@torproject.org>2020-07-29 12:35:57 -0400
commit8c92d44622263d5d57a794a9bd1d8f78eb532a73 (patch)
tree04e6541fba4d135cf0b13785a8df6e4639278466 /src/app
parent8e690ce736b3c61a1f007df4a1cd542e97e602c5 (diff)
parenteab8e7af522d18620450003667579eebaa339896 (diff)
downloadtor-8c92d44622263d5d57a794a9bd1d8f78eb532a73.tar.gz
tor-8c92d44622263d5d57a794a9bd1d8f78eb532a73.zip
Merge remote-tracking branch 'tor-gitlab/mr/68' into maint-0.4.4
Diffstat (limited to 'src/app')
-rw-r--r--src/app/main/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/app/main/main.c b/src/app/main/main.c
index 66776fc40b..d7d36bff4e 100644
--- a/src/app/main/main.c
+++ b/src/app/main/main.c
@@ -841,8 +841,10 @@ sandbox_init_filter(void)
OPEN_DATADIR2(name, name2 suffix); \
} while (0)
+// KeyDirectory is a directory, but it is only opened in check_private_dir
+// which calls open instead of opendir
#define OPEN_KEY_DIRECTORY() \
- OPENDIR(options->KeyDirectory)
+ OPEN(options->KeyDirectory)
#define OPEN_CACHEDIR(name) \
sandbox_cfg_allow_open_filename(&cfg, get_cachedir_fname(name))
#define OPEN_CACHEDIR_SUFFIX(name, suffix) do { \
@@ -856,7 +858,9 @@ sandbox_init_filter(void)
OPEN_KEYDIR(name suffix); \
} while (0)
- OPENDIR(options->DataDirectory);
+ // DataDirectory is a directory, but it is only opened in check_private_dir
+ // which calls open instead of opendir
+ OPEN(options->DataDirectory);
OPEN_KEY_DIRECTORY();
OPEN_CACHEDIR_SUFFIX("cached-certs", ".tmp");