]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Resume expanding abbreviations for command-line options
authorRoger Dingledine <arma@torproject.org>
Wed, 27 Aug 2014 10:10:35 +0000 (06:10 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 28 Aug 2014 12:33:43 +0000 (08:33 -0400)
The fix for bug 4647 accidentally removed our hack from bug 586 that
rewrote HashedControlPassword to __HashedControlSessionPassword when
it appears on the commandline (which allowed the user to set her own
HashedControlPassword in the torrc file while the controller generates
a fresh session password for each run).

Fixes bug 12948; bugfix on 0.2.5.1-alpha.

changes/bug12948 [new file with mode: 0644]
src/or/config.c

diff --git a/changes/bug12948 b/changes/bug12948
new file mode 100644 (file)
index 0000000..431c0a1
--- /dev/null
@@ -0,0 +1,8 @@
+  o Major bugfixes:
+    - Resume expanding abbreviations for command-line options. The fix
+      for bug 4647 accidentally removed our hack from bug 586 that rewrote
+      HashedControlPassword to __HashedControlSessionPassword when it
+      appears on the commandline (which allowed the user to set her
+      own HashedControlPassword in the torrc file while the controller
+      generates a fresh session password for each run). Fixes bug 12948;
+      bugfix on 0.2.5.1-alpha.
index 6bb620937a1b973c3f67ae3569df4389afe7718e..921503b4b9ae0ae93e496ddf797956c2cb35cdcb 100644 (file)
@@ -1932,7 +1932,8 @@ config_parse_commandline(int argc, char **argv, int ignore_errors,
     }
 
     param = tor_malloc_zero(sizeof(config_line_t));
-    param->key = is_cmdline ? tor_strdup(argv[i]) : tor_strdup(s);
+    param->key = is_cmdline ? tor_strdup(argv[i]) :
+                   tor_strdup(config_expand_abbrev(&options_format, s, 1, 1));
     param->value = arg;
     param->command = command;
     param->next = NULL;