diff options
author | Roger Dingledine <arma@torproject.org> | 2018-11-04 07:30:46 -0500 |
---|---|---|
committer | Alexander Færøy <ahf@torproject.org> | 2018-11-06 15:50:56 +0100 |
commit | 3a2cb83685e03b861abc1ebd54779c1244a26217 (patch) | |
tree | eb4237e9dba106d2b7ab028859a7f1963c82be21 /src | |
parent | 6bd069630a64e540cb118ad84c2bcbb470ce92f8 (diff) | |
download | tor-3a2cb83685e03b861abc1ebd54779c1244a26217.tar.gz tor-3a2cb83685e03b861abc1ebd54779c1244a26217.zip |
refuse to start with relative paths + RunAsDaemon
Resume refusing to start with relative file paths and RunAsDaemon
set (regression from the fix for bug 22731).
Fixes bug 28298; bugfix on 0.3.3.1-alpha.
Diffstat (limited to 'src')
-rw-r--r-- | src/or/config.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/or/config.c b/src/or/config.c index 58080c65e3..783412acc4 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -3307,12 +3307,6 @@ options_validate(or_options_t *old_options, or_options_t *options, * Always use the value of UseEntryGuards, not UseEntryGuards_option. */ options->UseEntryGuards = options->UseEntryGuards_option; - if (warn_about_relative_paths(options) && options->RunAsDaemon) { - REJECT("You have specified at least one relative path (see above) " - "with the RunAsDaemon option. RunAsDaemon is not compatible " - "with relative paths."); - } - if (server_mode(options) && (!strcmpstart(uname, "Windows 95") || !strcmpstart(uname, "Windows 98") || @@ -3329,6 +3323,14 @@ options_validate(or_options_t *old_options, or_options_t *options, if (validate_data_directories(options)<0) REJECT("Invalid DataDirectory"); + /* need to check for relative paths after we populate + * options->DataDirectory (just above). */ + if (warn_about_relative_paths(options) && options->RunAsDaemon) { + REJECT("You have specified at least one relative path (see above) " + "with the RunAsDaemon option. RunAsDaemon is not compatible " + "with relative paths."); + } + if (options->Nickname == NULL) { if (server_mode(options)) { options->Nickname = tor_strdup(UNNAMED_ROUTER_NICKNAME); |