diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-11-06 15:19:04 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-11-06 15:19:04 -0500 |
commit | 8a5590ebace8a1c1b367e0eec29ed8bc2712e812 (patch) | |
tree | b7dd914d9484b5778003aa7ff6def2198eb2fd0d /src/app | |
parent | 67abf55d6b2d2c10a1e666e0295d40890935f304 (diff) | |
parent | 3a2cb83685e03b861abc1ebd54779c1244a26217 (diff) | |
download | tor-8a5590ebace8a1c1b367e0eec29ed8bc2712e812.tar.gz tor-8a5590ebace8a1c1b367e0eec29ed8bc2712e812.zip |
Merge remote-tracking branch 'tor-github/pr/484' into maint-0.3.5
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/config/config.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c index 6e7e131055..81cc3e378f 100644 --- a/src/app/config/config.c +++ b/src/app/config/config.c @@ -3375,12 +3375,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") || @@ -3397,6 +3391,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); |