From 4e14ce4dba168ad4564fa15d4e86b4f4e9d36655 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 9 Jan 2012 13:20:48 -0500 Subject: [PATCH 1/2] Report cookie file location as absolute in protocolinfo message --- src/or/control.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/or/control.c b/src/or/control.c index c9d3765ad3..3ba7bfeb4b 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -2944,8 +2944,11 @@ handle_control_protocolinfo(control_connection_t *conn, uint32_t len, const or_options_t *options = get_options(); int cookies = options->CookieAuthentication; char *cfile = get_cookie_file(); - char *esc_cfile = esc_for_log(cfile); + char *abs_cfile; + char *esc_cfile; char *methods; + abs_cfile = make_path_absolute(cfile); + esc_cfile = esc_for_log(abs_cfile); { int passwd = (options->HashedControlPassword != NULL || options->HashedControlSessionPassword != NULL); @@ -2971,6 +2974,7 @@ handle_control_protocolinfo(control_connection_t *conn, uint32_t len, escaped(VERSION)); tor_free(methods); tor_free(cfile); + tor_free(abs_cfile); tor_free(esc_cfile); } done: From 3085b76a0996d87ed32482f1023963ccbc28f4d3 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 10 Jan 2012 14:59:49 -0500 Subject: [PATCH 2/2] changes file for #4881 --- changes/absolute_cookie_file | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changes/absolute_cookie_file diff --git a/changes/absolute_cookie_file b/changes/absolute_cookie_file new file mode 100644 index 0000000000..db9f7be6c1 --- /dev/null +++ b/changes/absolute_cookie_file @@ -0,0 +1,3 @@ + o Minor features (controller): + - When reporting the path to the cookie file to the controller, + give an absolute path. Resolves ticket 4881.