aboutsummaryrefslogtreecommitdiff
path: root/src/app/config/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-05-14 19:20:53 -0400
committerNick Mathewson <nickm@torproject.org>2019-05-14 19:20:53 -0400
commit1c95bdb83b1bbbde51b21e30aaed16b406ed7ec5 (patch)
tree3839ce110f425ea7a6c44dd799b7af438083125d /src/app/config/config.c
parent43d41194546dbf6a634648d592e97ccd10b04fda (diff)
parent1b16fcb70cb9507184fe7316396c93c1daa12674 (diff)
downloadtor-1c95bdb83b1bbbde51b21e30aaed16b406ed7ec5.tar.gz
tor-1c95bdb83b1bbbde51b21e30aaed16b406ed7ec5.zip
Merge branch 'ticket30452_035_v3' into ticket30452_041_v3
Diffstat (limited to 'src/app/config/config.c')
-rw-r--r--src/app/config/config.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c
index e601bb2ecd..d03305627b 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -2449,6 +2449,7 @@ static const struct {
{ "--quiet", TAKES_NO_ARGUMENT },
{ "--hush", TAKES_NO_ARGUMENT },
{ "--version", TAKES_NO_ARGUMENT },
+ { "--list-modules", TAKES_NO_ARGUMENT },
{ "--library-versions", TAKES_NO_ARGUMENT },
{ "-h", TAKES_NO_ARGUMENT },
{ "--help", TAKES_NO_ARGUMENT },
@@ -2670,6 +2671,13 @@ list_deprecated_options(void)
}
}
+/** Print all compile-time modules and their enabled/disabled status. */
+static void
+list_enabled_modules(void)
+{
+ printf("%s: %s\n", "dirauth", have_module_dirauth() ? "yes" : "no");
+}
+
/** Last value actually set by resolve_my_address. */
static uint32_t last_resolved_addr = 0;
@@ -5195,6 +5203,11 @@ options_init_from_torrc(int argc, char **argv)
return 1;
}
+ if (config_line_find(cmdline_only_options, "--list-modules")) {
+ list_enabled_modules();
+ return 1;
+ }
+
if (config_line_find(cmdline_only_options, "--library-versions")) {
printf("Tor version %s. \n", get_version());
printf("Library versions\tCompiled\t\tRuntime\n");