瀏覽代碼

Hide options beginning with "___" from GETINFO config/names

meejah 13 年之前
父節點
當前提交
f43946829c
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/or/config.c

+ 3 - 0
src/or/config.c

@@ -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;