summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-09-12 17:37:25 -0400
committerNick Mathewson <nickm@torproject.org>2017-09-12 17:37:25 -0400
commit7ee486c15f51177016baf85c1d21244b84667dc2 (patch)
treec2e9982afd54e21c7f7b61375c137e59f474008e /src/common
parent3138fe2e694a7036d28427ee3d76e639d15e4bc0 (diff)
downloadtor-7ee486c15f51177016baf85c1d21244b84667dc2.tar.gz
tor-7ee486c15f51177016baf85c1d21244b84667dc2.zip
Log correctly on owner/user mismatch.
Found with clang's scan-build while looking at dead assignments. Fixes bug 23487; bugfix on 1135405c8c6ea31 in 0.2.9.1-alpha
Diffstat (limited to 'src/common')
-rw-r--r--src/common/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/util.c b/src/common/util.c
index d2cbacde31..40f05468d8 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -2334,8 +2334,8 @@ check_private_dir,(const char *dirname, cpd_check_t check,
log_warn(LD_FS, "%s is not owned by this user (%s, %d) but by "
"%s (%d). Perhaps you are running Tor as the wrong user?",
- dirname, process_ownername, (int)running_uid,
- pw ? pw->pw_name : "<unknown>", (int)st.st_uid);
+ dirname, process_ownername, (int)running_uid,
+ pw_uid ? pw_uid->pw_name : "<unknown>", (int)st.st_uid);
tor_free(process_ownername);
close(fd);