Merge branch 'bug18902_squashed'

This commit is contained in:
Nick Mathewson
2016-07-28 06:59:03 -04:00
34 changed files with 187 additions and 180 deletions
+7 -6
View File
@@ -2320,13 +2320,14 @@ check_private_dir,(const char *dirname, cpd_check_t check,
running_gid = getgid();
}
if (st.st_uid != running_uid) {
const struct passwd *pw = NULL;
const struct passwd *pw_uid = NULL;
char *process_ownername = NULL;
pw = tor_getpwuid(running_uid);
process_ownername = pw ? tor_strdup(pw->pw_name) : tor_strdup("<unknown>");
pw_uid = tor_getpwuid(running_uid);
process_ownername = pw_uid ? tor_strdup(pw_uid->pw_name) :
tor_strdup("<unknown>");
pw = tor_getpwuid(st.st_uid);
pw_uid = tor_getpwuid(st.st_uid);
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?",
@@ -3840,9 +3841,9 @@ format_win_cmdline_argument(const char *arg)
formatted_arg[i++] = '"';
/* Add characters */
SMARTLIST_FOREACH(arg_chars, char*, c,
SMARTLIST_FOREACH(arg_chars, char*, ch,
{
formatted_arg[i++] = *c;
formatted_arg[i++] = *ch;
});
/* Add trailing quote */