summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2011-04-23 02:57:53 +0200
committerNick Mathewson <nickm@torproject.org>2011-05-15 20:20:28 -0400
commit4198261291c8edbd5ba1617b7bfe3563e51edbe7 (patch)
tree62e0cd1b1aad01a4b40b59d1faa69c644f5252d4 /src/or/config.c
parentd41ac64ad68811d8575db6e456fba470b0c3fde7 (diff)
downloadtor-4198261291c8edbd5ba1617b7bfe3563e51edbe7.tar.gz
tor-4198261291c8edbd5ba1617b7bfe3563e51edbe7.zip
Clean up the 2972 implementation a little
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/or/config.c b/src/or/config.c
index c81fc9c594..614fc48c3e 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -209,7 +209,7 @@ static config_var_t _option_vars[] = {
V(ControlPortFileGroupReadable,BOOL, "0"),
V(ControlPortWriteToFile, FILENAME, NULL),
V(ControlSocket, LINELIST, NULL),
- V(UnixSocketsGroupWritable, BOOL, "0"),
+ V(ControlSocketsGroupWritable, BOOL, "0"),
V(CookieAuthentication, BOOL, "0"),
V(CookieAuthFileGroupReadable, BOOL, "0"),
V(CookieAuthFile, STRING, NULL),
@@ -953,9 +953,15 @@ options_act_reversible(or_options_t *old_options, char **msg)
}
#ifndef HAVE_SYS_UN_H
- if (options->ControlSocket || options->UnixSocketsGroupWritable) {
- *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