[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r11438: Backport: Do not load state when options->command is not RUN (in tor/branches/tor-0_1_2-patches: . src/or)
Author: nickm
Date: 2007-09-13 13:40:11 -0400 (Thu, 13 Sep 2007)
New Revision: 11438
Modified:
tor/branches/tor-0_1_2-patches/
tor/branches/tor-0_1_2-patches/ChangeLog
tor/branches/tor-0_1_2-patches/src/or/config.c
Log:
r14427@Kushana: nickm | 2007-09-13 13:28:22 -0400
Backport: Do not load state when options->command is not RUN_TOR. (Resolves bug 499)
Property changes on: tor/branches/tor-0_1_2-patches
___________________________________________________________________
svk:merge ticket from /tor/branches/012 [r14427] on c95137ef-5f19-0410-b913-86e773d04f59
Modified: tor/branches/tor-0_1_2-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_1_2-patches/ChangeLog 2007-09-13 17:01:08 UTC (rev 11437)
+++ tor/branches/tor-0_1_2-patches/ChangeLog 2007-09-13 17:40:11 UTC (rev 11438)
@@ -3,7 +3,12 @@
- Fix possible segfaults in functions called from
rend_process_relay_cell().
+ o Minor bugfixes:
+ - Don't try to access (or alter) the state file when running
+ --list-fingerprint or --verify-config or --hash-password. (Resolves
+ bug 499.)
+
Changes in version 0.1.2.17 - 2007-08-30
o Major bugfixes (security):
- We removed support for the old (v0) control protocol. It has been
Modified: tor/branches/tor-0_1_2-patches/src/or/config.c
===================================================================
--- tor/branches/tor-0_1_2-patches/src/or/config.c 2007-09-13 17:01:08 UTC (rev 11437)
+++ tor/branches/tor-0_1_2-patches/src/or/config.c 2007-09-13 17:40:11 UTC (rev 11438)
@@ -917,16 +917,16 @@
tor_free(fn);
}
+ /* Bail out at this point if we're not going to be a client or server:
+ * we want to not fork, and to log stuff to stderr. */
+ if (options->command != CMD_RUN_TOR)
+ return 0;
+
/* Load state */
if (! global_state)
if (or_state_load())
return -1;
- /* Bail out at this point if we're not going to be a client or server:
- * we want to not fork, and to log stuff to stderr. */
- if (options->command != CMD_RUN_TOR)
- return 0;
-
{
smartlist_t *sl = smartlist_create();
char *errmsg = NULL;