aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-05-15 20:22:44 -0400
committerNick Mathewson <nickm@torproject.org>2011-05-15 20:22:44 -0400
commit4ac8ff9c9f182b6202200480f8fc4689da659331 (patch)
treec7817f2cc0755ff989df49b85abde0763bbb4bf2 /src/or/config.c
parentf2c170218238a38a0106acb1a7428b514ce979ca (diff)
parentede102fd4675af8ac4060767f0348f3c93617e80 (diff)
downloadtor-4ac8ff9c9f182b6202200480f8fc4689da659331.tar.gz
tor-4ac8ff9c9f182b6202200480f8fc4689da659331.zip
Merge remote-tracking branch 'origin/maint-0.2.2'
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/or/config.c b/src/or/config.c
index cc775e6105..78cc4772e9 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -214,6 +214,7 @@ static config_var_t _option_vars[] = {
V(ControlPortFileGroupReadable,BOOL, "0"),
V(ControlPortWriteToFile, FILENAME, NULL),
V(ControlSocket, LINELIST, NULL),
+ V(ControlSocketsGroupWritable, BOOL, "0"),
V(CookieAuthentication, BOOL, "0"),
V(CookieAuthFileGroupReadable, BOOL, "0"),
V(CookieAuthFile, STRING, NULL),
@@ -974,9 +975,15 @@ options_act_reversible(or_options_t *old_options, char **msg)
}
#ifndef HAVE_SYS_UN_H
- if (options->ControlSocket) {
- *msg = tor_strdup("Unix domain sockets (ControlSocket) not supported"
- " on this OS/with this build.");
+ if (options->ControlSocket || options->ControlSocketsGroupWritable) {
+ *msg = tor_strdup("Unix domain sockets (ControlSocket) not supported "
+ "on this OS/with this build.");
+ goto rollback;
+ }
+#else
+ if (options->ControlSocketsGroupWritable && !options->ControlSocket) {
+ *msg = tor_strdup("Setting ControlSocketGroupWritable without setting"
+ "a ControlSocket makes no sense.");
goto rollback;
}
#endif