aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-08-15 15:26:14 +0000
committerRoger Dingledine <arma@torproject.org>2007-08-15 15:26:14 +0000
commitf606d74f56ec13a21ea63f2c1b1e59bdc63f20b0 (patch)
tree2c5e92c50241d6f4c7d5a3283d8c106ccaefc79e /src/or/config.c
parent93375d9a84bf10113285cf2f8fd426f961002025 (diff)
downloadtor-f606d74f56ec13a21ea63f2c1b1e59bdc63f20b0.tar
tor-f606d74f56ec13a21ea63f2c1b1e59bdc63f20b0.tar.gz
backport candidate:
- If we require CookieAuthentication but we fail to write the cookie file, we would warn but not exit, and end up in a state where no controller could authenticate. Now we exit. - If we require CookieAuthentication, stop generating a new cookie every time we change any piece of our config. svn:r11117
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 804ec574f..168d0dbde 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1039,7 +1039,10 @@ options_act(or_options_t *old_options)
/* Update address policies. */
policies_parse_from_options(options);
- init_cookie_authentication(options->CookieAuthentication);
+ if (init_cookie_authentication(options->CookieAuthentication) < 0) {
+ log_warn(LD_CONFIG,"Error creating cookie authentication file.");
+ return -1;
+ }
/* reload keys as needed for rendezvous services. */
if (rend_service_load_keys()<0) {