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

[or-cvs] don"t check permissions on our datadirectory until we switc...



Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or

Modified Files:
	config.c 
Log Message:
don't check permissions on our datadirectory until we switch uid/gid


Index: config.c
===================================================================
RCS file: /home/or/cvsroot/src/or/config.c,v
retrieving revision 1.238
retrieving revision 1.239
diff -u -d -r1.238 -r1.239
--- config.c	9 Nov 2004 20:04:00 -0000	1.238
+++ config.c	10 Nov 2004 00:11:37 -0000	1.239
@@ -277,7 +277,7 @@
 
   /* XXXX We once had a reason to separate start_daemon and finish_daemon: It
    *    let us have the parent process stick around until we were sure Tor was
-   *    started.  Should se make start_daemon get called earlier? -NM */
+   *    started.  Should we make start_daemon get called earlier? -NM */
   if (options->RunAsDaemon) {
     start_daemon(options->DataDirectory);
   }
@@ -689,7 +689,7 @@
 
 /** Try assigning <b>list</b> to the global options. You do this by duping
  * options, assigning list to the new one, then validating it. If it's
- * ok, then through out the old one and stick with the new one. Else,
+ * ok, then throw out the old one and stick with the new one. Else,
  * revert to old and return failure.  Return 0 on success, -1 on bad
  * keys, -2 on bad values, -3 on bad transition.
  */
@@ -1234,6 +1234,8 @@
     return -1;
   }
 
+  /* XXX not allowed to change User or Group either */
+
   return 0;
 }
 
@@ -1839,7 +1841,7 @@
   return r;
 }
 
-/** Adjust or the value of options->DataDirectory, or fill it in if it's
+/** Adjust the value of options->DataDirectory, or fill it in if it's
  * absent. Return 0 on success, -1 on failure. */
 static int
 normalize_data_directory(or_options_t *options) {
@@ -1885,10 +1887,12 @@
     log_fn(LOG_ERR, "DataDirectory is too long.");
     return -1;
   }
+#if 0
   if (check_private_dir(options->DataDirectory, CPD_CHECK != 0)) {
     log_fn(LOG_WARN, "Can't create directory %s", options->DataDirectory);
     return -1;
   }
+#endif
   return 0;
 }