aboutsummaryrefslogtreecommitdiff
path: root/src/app/config/confparse.c
AgeCommit message (Collapse)Author
2019-08-24Make a function for NODUMP.Nick Mathewson
2019-08-24Make config_var_is_invisible a function.Nick Mathewson
2019-07-24Remove src/core/ and src/feature dependencies from confparse.cNick Mathewson
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.
2019-07-24Make config_var and config_fmt const.Nick Mathewson
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.
2019-06-25Make "invisibility" and "undumpability" properties of variables.Nick Mathewson
Previously, these were magical things that we detected by checking whether a variable's name was prefixed with two or three underscores.
2019-06-25Turn several properties of types or variables into flags.Nick Mathewson
"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.
2019-06-25Add a function to make sure all values in a config object are okNick Mathewson
2019-06-25Use struct_var_{copy,eq} in confparse.c.Nick Mathewson
2019-06-25Use struct_magic_decl to verify magic numbers in config objectsNick Mathewson
2019-06-25Port confparse to use struct_var in place of typed_var.Nick Mathewson
This requires changes to config_var_t, causing corresponding changes throughout its users.
2019-06-24Partially port routerset to being a full-fledged config type again.Nick Mathewson
2019-06-24Add a "typed_var" abstraction to implement lvalue access in C.Nick Mathewson
Right now, this has been done at a high level by confparse.c, but it makes more sense to lower it. This API is radically un-typesafe as it stands; we'll be wrapping it in a safer API as we do #30914 and lower the struct manipulation code as well. Closes ticket 30864.
2019-06-24Move unit-parsing code to src/lib/confmgtNick Mathewson
lib/confmgt is at a higher level than lib/conf, since it needs to call down to logging and similar modules.
2019-06-15Merge branch 'bug30894_035' into ticket30893Nick Mathewson
2019-06-15Add more unit tests for confparse.c, so we can refactor.Nick Mathewson
This set of tests gets the line coverage to 100%.
2019-06-15Fix memleak when failing to parse a CSV_INTERVAL.Nick Mathewson
Fixes bug 30894; bugfix on 0.3.4.1-alpha
2019-06-15Remove the PORT configuration type: nothing uses it.Nick Mathewson
All of our port configurations now use an extended format.
2019-06-15Renaming: CONFIG_TYPE_UINT -> CONFIG_TYPE_POSINTNick Mathewson
This name has been a historical source of confusion, since "uint" usually suggests "unsigned int" to people, when the real type is "nonnegative int".
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-16Bump copyright date to 2019.Nick Mathewson
2018-09-27Fix a memory leak in --dump-configNick Mathewson
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.
2018-08-01Convert __OwningControllerFD to a 64-bit valueNick Mathewson
This lets us potentially use it for internal passing of windows sockets.
2018-07-08Made 'auto' keyword in torrc case insensitiveKaidan
2018-07-05Fix every include path changed in the previous commit (automated)Nick Mathewson
I am very glad to have written this script.
2018-07-05Move literally everything out of src/orNick Mathewson
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.