Trac: Summary: Disable minimal dirauth and relay options when those modules are disabled to Phase 1: Disable minimal dirauth and relay options when those modules are disabled
I would like an initial review, if anyone has time :-)
It was actually pretty easy to split the dirauth config out into its own file. Now it is in its own file, we can disable all the detailed config checks when the module is disabled.
TODO:
relay
relay config split?
disable relay config when module is disabled
relay cleanup
standard
changes file
autoformat
regenerate practracker, and keep the improvements
Trac: Actualpoints: N/Ato 0.7 Status: assigned to needs_review
Taking review because ahf is busy. General comments:
I like all the code movement here, and I like how clean it looks with --color-moved. I look forward to merging this when it's done.
Let's see if we can get the coverage on the moved/changed code any higher, if that's reasonable?
Let's see if we can regenerate practracker in a way that only tightens the restrictions on improved files/modules.
Some previously static functions have become global. Not all of them have logical prefixes that tie them to a module/type. Let's do a quick audit of these functions, and rename them so that they follow our preferred conventions.
I have moved or modified all the code that uses the target relay and dirauth options out of config.c, which should make it easier and safer to disable them.
TODO:
relay
disable relay config when module is disabled
relay cleanup
relay/dirauth
rename new global functions so they are tied to a module/type
standard
improve test coverage, if reasonable
changes file
autoformat
regenerate practracker, but only commit the changes that tighten restrictions
Improving the test coverage for option validation is easy with test_parseconf.sh, but it's time-consuming. Improving the test coverage for options_act() could take a bit more work.
I pushed some more tests, and a fix for a bug I found in the new config code. I'll make a child ticket.
Trac: Summary: Phase 1: Disable minimal dirauth and relay options when those modules are disabled to Phase 0: Disable minimal dirauth and relay options when those modules are disabled