diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-08-25 13:13:18 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-09-13 12:36:40 -0400 |
commit | 75d795b1d7f6bbb2a9b48f81cfc2a2d03e11307f (patch) | |
tree | 5141563cac08adde98af12be57e7409e95e65f7c | |
parent | b523167f2f51479c325fbda4d1a85e9ee5ed02ec (diff) | |
download | tor-75d795b1d7f6bbb2a9b48f81cfc2a2d03e11307f.tar tor-75d795b1d7f6bbb2a9b48f81cfc2a2d03e11307f.tar.gz |
Disallow --hash-password with no commandline arguments.
Fixes bug 9573.
Bugfix on 59453ac6e in 0.0.9pre5, which fixed a crash in a silly way.
-rw-r--r-- | changes/bug4647 | 4 | ||||
-rw-r--r-- | doc/tor.1.txt | 2 | ||||
-rw-r--r-- | src/or/config.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/changes/bug4647 b/changes/bug4647 index 2ad08fec3..162a69c42 100644 --- a/changes/bug4647 +++ b/changes/bug4647 @@ -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. diff --git a/doc/tor.1.txt b/doc/tor.1.txt index ec00c093a..29a05d2e2 100644 --- a/doc/tor.1.txt +++ b/doc/tor.1.txt @@ -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**:: diff --git a/src/or/config.c b/src/or/config.c index cda769db8..7f1b77c4b 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -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.", |