Age | Commit message (Collapse) | Author |
|
This commit only does code movement, and does not clean up after
itself. As such, it will break compilation. I'm separating it for
ease of review.
|
|
|
|
Don't use "derived" directly, but check its implications for listing
and copying.
|
|
|
|
This change replaces the higher-level property check to match our
intended flag factoring.
|
|
|
|
Also document that it will be changed in a later branch.
|
|
These were sort of described in config_assign() documentation, but
not so well.
|
|
|
|
Previously we used int here, but it is more correct to use
ptrdiff_t. (This never actually matters for our code in practice,
since the structure we are managing here never exceed INT_MAX in
size.)
|
|
|
|
|
|
One test makes sure that the toplevel magic numbers are distinct.
One test makes sure that we can parse a configuration object
with two sub-objects.
|
|
|
|
A configuration manager, in addition to a top-level format object,
may now also know about a suite of sub-formats. Top-level
configuration objects, in turn, may now have a suite of
sub-objects.
|
|
Right now, it doesn't do anything; this patch is meant to make sure
that we're doing memory management correctly.
|
|
The right way to free a config object is now to wrap config_free(),
always. Instead of creating an alternative free function, objects
should provide an alternative clear callback to free any fields that
the configuration manager doesn't manage.
This lets us simplify our code a little, and lets us extend the
confparse.c code to manage additional fields in config_free.
|
|
|
|
|
|
This C file will eventually belong in lib/confmgt, so it needs to
have only low-level dependencies. Now that it no longers needs
routerset.c, we can adjust its includes accordingly.
I'm not moving the file yet, since it would make fixup commits on
earlier branches here really hard to do.
|
|
Now that we have a reasonable implementation for overriding the
default options for TestingTorNetwork, we don't need to modify
config_var_t structs any more. And therefore, we can have constant
format options, like reasonable people.
|
|
It's important to make sure that we don't change a config_mgr_t
after we start using it to make objects, or we could get into
inconsistent states. This feature is the start of a safety
mechanism to prevent this problem.
|
|
We'll want it to check all the subsidiary structures of the
options object.
|
|
Iterating over this array was once a good idea, but now that we are
going to have a separate structure for each submodule's
configuration variables, we should indirect through the config_mgr_t
object.
|
|
|
|
|
|
Remember that our goal in the present refactoring is to allow each
subsystem to declare its own configuration structure and
variables. To do this, each module will get its own
config_format_t, and so we'll want a different structure that wraps
several config_format_t objects. This is a "config_mgr_t".
|
|
"unsettable" is a property of types. LINELIST_V and OBSOLETE are
unsettable, meaning that they cannot be set by name.
"contained" is a property of types. I'm hoping to find a better
name here. LINELIST_S is "contained" because it always appears
within a LINELIST_V, and as such doesn't need to be dumped ore
copied independently.
"cumulative" is a property of types. Cumulative types can appear
more than once in a torrc without causing a warning, because they
add to each other rather than replacing each other.
"obsolete" is a property of variables.
"marking fragile" is now a command that struct members can accept.
With these changes, confparse and config no longer ever need to
mention CONFIG_TYPE_XYZ values by name.
|
|
The testing-only parts now live in a conftesting.h; the shared parts
of the macros live in confmacros.h
|
|
|
|
|
|
|
|
This requires changes to config_var_t, causing corresponding changes
throughout its users.
|
|
This will be a lower-level module than anything that actually
sets or handles configuration variables.
Part of 30864.
|
|
This set of tests gets the line coverage to 100%.
|
|
All of our port configurations now use an extended format.
|
|
|
|
When freeing a configuration object from confparse.c in
dump_config(), we need to call the appropriate higher-level free
function (like or_options_free()) and not just config_free().
This only happens with options (since they're the one where
options_validate allocates extra stuff) and only when running
--dump-config with something other than minimal (since
OPTIONS_DUMP_MINIMAL doesn't hit this code).
Fixes bug 27893; bugfix on 0.3.2.1-alpha.
|
|
This lets us potentially use it for internal passing of windows
sockets.
|
|
|
|
This commit won't build yet -- it just puts everything in a slightly
more logical place.
The reasoning here is that "src/core" will hold the stuff that every (or
nearly every) tor instance will need in order to do onion routing.
Other features (including some necessary ones) will live in
"src/feature". The "src/app" directory will hold the stuff needed
to have Tor be an application you can actually run.
This commit DOES NOT refactor the former contents of src/or into a
logical set of acyclic libraries, or change any code at all. That
will have to come in the future.
We will continue to move things around and split them in the future,
but I hope this lays a reasonable groundwork for doing so.
|