[or-cvs] If DataDir is ~/.tor, and that expands to /.tor, then defau...
Nick Mathewson
nickm at seul.org
Tue May 3 00:37:00 UTC 2005
Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv30983/src/or
Modified Files:
config.c
Log Message:
If DataDir is ~/.tor, and that expands to /.tor, then default to LOCALSTATEDIR/tor instead.
Index: config.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.338
retrieving revision 1.339
diff -u -d -r1.338 -r1.339
--- config.c 29 Apr 2005 18:52:05 -0000 1.338
+++ config.c 3 May 2005 00:36:57 -0000 1.339
@@ -2336,7 +2336,10 @@
if (!options->DataDirectory && !strcmp(fn,"/.tor")) {
/* If our homedir is /, we probably don't want to use it. */
/* XXXX Default to /var/lib/tor? */
- log_fn(LOG_WARN, "Defaulting to 'DataDirectory %s', which may not be what you want", fn);
+ log_fn(LOG_WARN, "Default DataDirectory is ~/.tor, which works out to %s, which is probably not what you want. Using %s/tor instead", fn, LOCALSTATEDIR);
+ tor_free(fn);
+ fn = tor_strdup(LOCALSTATEDIR"/tor");
+
}
tor_free(options->DataDirectory);
options->DataDirectory = fn;
More information about the tor-commits
mailing list