diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-01-06 09:14:22 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-01-06 09:25:23 -0500 |
commit | 5c240db0bf7751d74ba438a1ca4ef0d051a53df7 (patch) | |
tree | 04f6c39d11df09f8f8ab67878eba97f180adad0f /src/app/main/main.c | |
parent | dca2629480f143ed8deb71b73b15c7c5ff890571 (diff) | |
download | tor-5c240db0bf7751d74ba438a1ca4ef0d051a53df7.tar.gz tor-5c240db0bf7751d74ba438a1ca4ef0d051a53df7.zip |
Restore feature where nt-services detect non-"run_tor" modes.
Followup for #32883.
Diffstat (limited to 'src/app/main/main.c')
-rw-r--r-- | src/app/main/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/app/main/main.c b/src/app/main/main.c index 4275a98bd0..2a5cb4aa07 100644 --- a/src/app/main/main.c +++ b/src/app/main/main.c @@ -1279,6 +1279,13 @@ tor_run_main(const tor_main_configuration_t *tor_cfg) #endif } + if (tor_cfg->run_tor_only && get_options()->command != CMD_RUN_TOR) { + log_err(LD_CONFIG, "Unsupported command when running as an NT service."); + result = -1; + tor_cleanup(); + goto done; + } + switch (get_options()->command) { case CMD_RUN_TOR: #ifdef NT_SERVICE |