|
@@ -7180,6 +7180,20 @@ getinfo_helper_config(control_connection_t *conn,
|
|
|
*answer = smartlist_join_strings(sl, "", 0, NULL);
|
|
|
SMARTLIST_FOREACH(sl, char *, c, tor_free(c));
|
|
|
smartlist_free(sl);
|
|
|
+ } else if (!strcmp(question, "config/defaults")) {
|
|
|
+ smartlist_t *sl = smartlist_new();
|
|
|
+ int i;
|
|
|
+ for (i = 0; _option_vars[i].name; ++i) {
|
|
|
+ const config_var_t *var = &_option_vars[i];
|
|
|
+ if (var->initvalue != NULL) {
|
|
|
+ char *val = esc_for_log(var->initvalue);
|
|
|
+ smartlist_add_asprintf(sl, "%s %s\n",var->name,val);
|
|
|
+ tor_free(val);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ *answer = smartlist_join_strings(sl, "", 0, NULL);
|
|
|
+ SMARTLIST_FOREACH(sl, char *, c, tor_free(c));
|
|
|
+ smartlist_free(sl);
|
|
|
}
|
|
|
return 0;
|
|
|
}
|