summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2010-08-20 02:42:17 +0200
committerSebastian Hahn <sebastian@torproject.org>2010-08-20 02:45:10 +0200
commit219f7415d1765db8c59dc7530416a4293416c869 (patch)
treea3688360ea40001fa0b2224d6e42b94126210b18 /src/or/config.c
parenteba3f37f17a2af4ff628dd5cbc653441e6dce6eb (diff)
downloadtor-219f7415d1765db8c59dc7530416a4293416c869.tar.gz
tor-219f7415d1765db8c59dc7530416a4293416c869.zip
Warn for bad combination of cookie options
Setting CookieAuthFileGroupReadable but without setting CookieAuthFile makes no sense, because unix directory permissions for the data directory prevent the group from accessing the file anyways.
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 9d98d15450..7ad272f74c 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -3501,6 +3501,13 @@ options_validate(or_options_t *old_options, or_options_t *options,
"upgrade your Tor controller as soon as possible.");
}
+ if (options->CookieAuthFileGroupReadable && !options->CookieAuthFile) {
+ log_warn(LD_CONFIG, "You set the CookieAuthFileGroupReadable but did "
+ "not configure a the path for the cookie file via "
+ "CookieAuthFile. This means your cookie will not be group "
+ "readable.");
+ }
+
if (options->UseEntryGuards && ! options->NumEntryGuards)
REJECT("Cannot enable UseEntryGuards with NumEntryGuards set to 0");