mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Log correctly on owner/user mismatch.
Found with clang's scan-build while looking at dead assignments.
Fixes bug 23487; bugfix on 1135405c8c in 0.2.9.1-alpha
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
o Minor bugfixes (logging):
|
||||
- When warning about a directory owned by the wrong user, log the actual
|
||||
name of the user owning the directory. Previously, we'd log the name
|
||||
of the process owner twice. Fixes bug 23487; bugfix on 0.2.9.1-alpha.
|
||||
|
||||
+2
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user