summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorteor <teor2345@gmail.com>2016-11-02 14:32:04 +1100
committerteor <teor2345@gmail.com>2016-11-02 14:32:04 +1100
commit1747f28861e1f5ce8fc5c8cb3eaad0c7f2297dc9 (patch)
tree50987d5db5b164e911dd720f62e5abe63627fd3b /src
parent01fe039b78e6115615ff2e3c3341bcb03100a7f0 (diff)
downloadtor-1747f28861e1f5ce8fc5c8cb3eaad0c7f2297dc9.tar.gz
tor-1747f28861e1f5ce8fc5c8cb3eaad0c7f2297dc9.zip
Check every hidden service directory's permissions when configuring
Previously, we would only check the last hidden service directory. Fixes #20529, bugfix on ticket 13942 commit 85bfad1 in 0.2.6.2-alpha.
Diffstat (limited to 'src')
-rw-r--r--src/or/rendservice.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 7dbcf718f7..c62673a74c 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -464,6 +464,11 @@ rend_config_services(const or_options_t *options, int validate_only)
for (line = options->RendConfigLines; line; line = line->next) {
if (!strcasecmp(line->key, "HiddenServiceDir")) {
if (service) { /* register the one we just finished parsing */
+ if (rend_service_check_private_dir(service, 0) < 0) {
+ rend_service_free(service);
+ return -1;
+ }
+
if (validate_only)
rend_service_free(service);
else