commit 1747f28861e1f5ce8fc5c8cb3eaad0c7f2297dc9 Author: teor teor2345@gmail.com Date: Wed Nov 2 14:32:04 2016 +1100
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. --- changes/bug20529 | 4 ++++ src/or/rendservice.c | 5 +++++ 2 files changed, 9 insertions(+)
diff --git a/changes/bug20529 b/changes/bug20529 new file mode 100644 index 0000000..276be5b --- /dev/null +++ b/changes/bug20529 @@ -0,0 +1,4 @@ + o Minor bugfixes (hidden services): + - When configuring hidden services, check every hidden service directory's + permissions. Previously, we only checked the last hidden service. + Fixes bug 20529; bugfix on 13942 commit 85bfad1 in 0.2.6.2-alpha. diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 7dbcf71..c62673a 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