[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r12884: Don't try to create the datadir when we are only verifying t (in tor/trunk: . src/or)



Author: nickm
Date: 2007-12-20 01:15:09 -0500 (Thu, 20 Dec 2007)
New Revision: 12884

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/src/or/config.c
Log:
 r17274@catbus:  nickm | 2007-12-20 01:14:09 -0500
 Don't try to create the datadir when we are only verifying the configuration or hashing a password. Resolves bug 540.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r17274] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-12-20 05:09:53 UTC (rev 12883)
+++ tor/trunk/ChangeLog	2007-12-20 06:15:09 UTC (rev 12884)
@@ -399,6 +399,8 @@
       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

Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c	2007-12-20 05:09:53 UTC (rev 12883)
+++ tor/trunk/src/or/config.c	2007-12-20 06:15:09 UTC (rev 12884)
@@ -1004,7 +1004,8 @@
   }
 
   /* 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\"",