]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
r17274@catbus: nickm | 2007-12-20 01:14:09 -0500
authorNick Mathewson <nickm@torproject.org>
Thu, 20 Dec 2007 06:15:09 +0000 (06:15 +0000)
committerNick Mathewson <nickm@torproject.org>
Thu, 20 Dec 2007 06:15:09 +0000 (06:15 +0000)
 Don't try to create the datadir when we are only verifying the configuration or hashing a password. Resolves bug 540.

svn:r12884

ChangeLog
src/or/config.c

index 119eb1c0bb8755227151ae92f655787aafeb7cfa..e834d5720c4b51fa04cb9c2413f87355854fdea1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -399,6 +399,8 @@ Changes in version 0.1.2.18 - 2007-10-28
       is fishy. Resolves bug 463.
     - Don't reset trusted dir server list when we set a configuration
       option. Patch from Robert Hogan.
+    - Don't try to create the datadir when running --verify-config or
+      --hash-password. Resolves bug 540.
 
 
 Changes in version 0.2.0.9-alpha - 2007-10-24
index a7650637f19cf7d1bc810c0bff86c77f0bddea14..83fec4e1bb4fc25ff4b01770df702201689c8a1e 100644 (file)
@@ -1004,7 +1004,8 @@ options_act_reversible(or_options_t *old_options, char **msg)
   }
 
   /* Ensure data directory is private; create if possible. */
-  if (check_private_dir(options->DataDirectory, CPD_CREATE)<0) {
+  if (check_private_dir(options->DataDirectory,
+                        running_tor ? CPD_CREATE : CPD_CHECK)<0) {
     char buf[1024];
     int tmp = tor_snprintf(buf, sizeof(buf),
               "Couldn't access/create private data directory \"%s\"",