]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Handle __NonSavedOptions correctly inside LINELIST_V blocks.
authorNick Mathewson <nickm@torproject.org>
Wed, 18 Jan 2017 15:24:37 +0000 (10:24 -0500)
committerNick Mathewson <nickm@torproject.org>
Wed, 18 Jan 2017 15:25:10 +0000 (10:25 -0500)
src/or/confparse.c

index efcf4f981e89582c5f5e42e59186b455a73b8060..2d6cc7ac625288ff4bdf8f9539e243cfc210b75f 100644 (file)
@@ -1148,6 +1148,11 @@ config_dump(const config_format_t *fmt, const void *default_options,
       config_get_assigned_option(fmt, options, fmt->vars[i].name, 1);
 
     for (; line; line = line->next) {
+      if (!strcmpstart(line->key, "__")) {
+        /* This check detects "hidden" variables inside LINELIST_V structures.
+         */
+        continue;
+      }
       smartlist_add_asprintf(elements, "%s%s %s\n",
                    comment_option ? "# " : "",
                    line->key, line->value);