summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-02-05 21:39:32 +0000
committerNick Mathewson <nickm@torproject.org>2008-02-05 21:39:32 +0000
commite09c207c3c233f84bfb99492eb4163f4a5d0a71c (patch)
tree4cf364f3d4cb08b33db0ed77a481a5fb6f54bb8d /src/or/config.c
parentc8a689c9e8ce3a03c5815da2535b56812450d5ae (diff)
downloadtor-e09c207c3c233f84bfb99492eb4163f4a5d0a71c.tar.gz
tor-e09c207c3c233f84bfb99492eb4163f4a5d0a71c.zip
r17910@catbus: nickm | 2008-02-05 15:36:29 -0500
Check for correctness of AuthDir* options in options_validate; check for possible bugs where options_validate() is happy but parse_policies_from_options() is sad. svn:r13384
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 6a771909e5..cca9a3c402 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1182,7 +1182,11 @@ options_act(or_options_t *old_options)
parse_virtual_addr_network(options->VirtualAddrNetwork, 0, &msg);
/* Update address policies. */
- policies_parse_from_options(options);
+ if (policies_parse_from_options(options) < 0) {
+ /* This should be impossible, but let's be sure. */
+ log_warn(LD_BUG,"Error parsing already-validated policy options.");
+ return -1;
+ }
if (init_cookie_authentication(options->CookieAuthentication) < 0) {
log_warn(LD_CONFIG,"Error creating cookie authentication file.");