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
This commit is contained in:
Nick Mathewson 2008-03-27 16:46:34 +00:00
parent 932b57813a
commit 12b217bce8
2 changed files with 10 additions and 3 deletions

View File

@ -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

View File

@ -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);