]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Disallow --hash-password with no commandline arguments.
authorNick Mathewson <nickm@torproject.org>
Sun, 25 Aug 2013 17:13:18 +0000 (13:13 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 13 Sep 2013 16:36:40 +0000 (12:36 -0400)
Fixes bug 9573.

Bugfix on 59453ac6e in 0.0.9pre5, which fixed a crash in a silly way.

changes/bug4647
doc/tor.1.txt
src/or/config.c

index 2ad08fec31140b3c81ee1a805963ef457106974c..162a69c42ea0caedea27042f8eb3d27bc2fb4684 100644 (file)
@@ -6,6 +6,6 @@
       names as command-line options. Fixes bugs 4647 and 9578; bugfix on
       0.0.9pre5.
 
-
-
+    - No longer allow 'tor --hash-password' with no arguments. Fixes bug
+      9573; bugfix on 0.0.9pre5.
 
index ec00c093a237970b566aaf21506debaae677f941..29a05d2e2aec26915b2a69e1a74ea214460db10f 100644 (file)
@@ -46,7 +46,7 @@ COMMAND-LINE OPTIONS
     configuration file, and by those on the command line. (Default:
     @CONFDIR@/torrc-defaults.)
 
-**--hash-password**::
+**--hash-password** __PASSWORD__::
     Generates a hashed password for control port access.
 
 **--list-fingerprint**::
index cda769db8c1bfcc48bbfd6b32bba6a04d5ab3bd0..7f1b77c4b17bea88a078742dc574b94dac18f37f 100644 (file)
@@ -1867,7 +1867,7 @@ config_parse_commandline(int argc, char **argv, int ignore_errors,
     }
 
     if (want_arg && i == argc-1) {
-      if (!strcmp(argv[i],"--hash-password") || ignore_errors) {
+      if (ignore_errors) {
         arg = strdup("");
       } else {
         log_warn(LD_CONFIG,"Command-line option '%s' with no value. Failing.",