From c83d83814660b643b705ed7de4aa1fc35e2d20ad Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 9 Jan 2015 11:36:47 -0500 Subject: Implement proposal 227-vote-on-package-fingerprints.txt This implementation includes tests and a little documentation. --- src/or/config.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/or/config.c') diff --git a/src/or/config.c b/src/or/config.c index 2fa077e146..ab48bac50b 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -73,6 +73,7 @@ static config_abbrev_t option_abbrevs_[] = { PLURAL(HiddenServiceExcludeNode), PLURAL(NumCPU), PLURAL(RendNode), + PLURAL(RecommendedPackage), PLURAL(RendExcludeNode), PLURAL(StrictEntryNode), PLURAL(StrictExitNode), @@ -352,6 +353,7 @@ static config_var_t option_vars_[] = { V(RecommendedVersions, LINELIST, NULL), V(RecommendedClientVersions, LINELIST, NULL), V(RecommendedServerVersions, LINELIST, NULL), + V(RecommendedPackages, LINELIST, NULL), V(RefuseUnknownExits, AUTOBOOL, "auto"), V(RejectPlaintextPorts, CSV, ""), V(RelayBandwidthBurst, MEMUNIT, "0"), @@ -2725,6 +2727,13 @@ options_validate(or_options_t *old_options, or_options_t *options, "features to be broken in unpredictable ways."); } + for (cl = options->RecommendedPackages; cl; cl = cl->next) { + if (! validate_recommended_package_line(cl->value)) { + log_warn(LD_CONFIG, "Invalid RecommendedPackage line %s will be ignored", + escaped(cl->value)); + } + } + if (options->AuthoritativeDir) { if (!options->ContactInfo && !options->TestingTorNetwork) REJECT("Authoritative directory servers must set ContactInfo"); -- cgit v1.2.3-54-g00ecf