]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Hide options beginning with "___" from GETINFO config/names
authormeejah <meejah@meejah.ca>
Mon, 19 Mar 2012 06:00:10 +0000 (00:00 -0600)
committerNick Mathewson <nickm@torproject.org>
Mon, 10 Sep 2012 13:51:31 +0000 (09:51 -0400)
src/or/config.c

index 6ee1ce00a891cbed7c9fab19c60589eaf4cfe2c9..78f86595fc628b8f99435e82ac20b7dcebd2b79f 100644 (file)
@@ -7307,6 +7307,9 @@ getinfo_helper_config(control_connection_t *conn,
     for (i = 0; _option_vars[i].name; ++i) {
       const config_var_t *var = &_option_vars[i];
       const char *type;
+      /* don't tell controller about triple-underscore options */
+      if (!strncmp(_option_vars[i].name, "___", 3))
+         continue;
       switch (var->type) {
         case CONFIG_TYPE_STRING: type = "String"; break;
         case CONFIG_TYPE_FILENAME: type = "Filename"; break;