]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Warn about missing ContactInfo when MyFamily set
authorJosé M. Guisado <guigom@riseup.net>
Thu, 31 Jan 2019 12:27:42 +0000 (13:27 +0100)
committerJosé M. Guisado <guigom@riseup.net>
Thu, 31 Jan 2019 12:27:42 +0000 (13:27 +0100)
Operators should be warned when setting MyFamily in
addition to missing ContactInfo

Signed-off-by: José M. Guisado <guigom@riseup.net>
changes/ticket25110 [new file with mode: 0644]
src/app/config/config.c

diff --git a/changes/ticket25110 b/changes/ticket25110
new file mode 100644 (file)
index 0000000..298e332
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes (logging, configuration):
+    - Warn operators when MyFamily option is set but ContactInfo
+      is missing, as the latter should be set too.
+      Fixes bug 25110; bugfix on 0.3.3.1-alpha.
index 952b9cd301166b43e4d08f95863595a65c4dea33..6b9162a3df48113fd83916e4982d6c956de6480c 100644 (file)
@@ -4179,6 +4179,10 @@ options_validate(or_options_t *old_options, or_options_t *options,
              "You should also make sure you aren't listing this bridge's "
              "fingerprint in any other MyFamily.");
   }
+  if (options->MyFamily_lines && !options->ContactInfo) {
+    log_warn(LD_CONFIG, "MyFamily is set but ContactInfo is not configured. "
+             "ContactInfo should always be set when MyFamily option is too.");
+  }
   if (normalize_nickname_list(&options->MyFamily,
                               options->MyFamily_lines, "MyFamily", msg))
     return -1;