diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-03-27 16:46:34 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-03-27 16:46:34 +0000 |
commit | 12b217bce8ff4de74c0295470247e4e9d1b15931 (patch) | |
tree | 2a1d0766171ddb2dc15e3935bb5c853472ec10e1 | |
parent | 932b57813a06a200235e996bfb4daaf143bd003e (diff) | |
download | tor-12b217bce8ff4de74c0295470247e4e9d1b15931.tar.gz tor-12b217bce8ff4de74c0295470247e4e9d1b15931.zip |
r19091@catbus: nickm | 2008-03-27 12:42:57 -0400
Stop reading torrc when all we want to do is --hash-password. Fix based on patch from Sebastian Hahn. Backport candidate.
svn:r14214
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/or/config.c | 10 |
2 files changed, 10 insertions, 3 deletions
@@ -19,6 +19,9 @@ Changes in version 0.2.1.1-alpha - 2008-??-?? leaks. Bugfix on 0.2.0.19-alpha. - Free static hashtables for policy maps and for TLS connections on shutdown, so they don't look like memory leaks. Bugfix on 0.2.0.x. + - Do not read the configuration file when we've only been told to + generate a password hash. Bugfix on 0.0.9pre5. Fix based on patch + from Sebastian Hahn. o Minor features: - Allow separate log levels to be configured for different logging diff --git a/src/or/config.c b/src/or/config.c index f0d8902022..10ddf590c5 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -3681,9 +3681,13 @@ options_init_from_torrc(int argc, char **argv) } } - cf = load_torrc_from_disk(argc, argv); - if (!cf) - goto err; + if (command == CMD_HASH_PASSWORD) { + cf = tor_strdup(""); + } else { + cf = load_torrc_from_disk(argc, argv); + if (!cf) + goto err; + } retval = options_init_from_string(cf, command, command_arg, &errmsg); tor_free(cf); |