Loading changes/bug19578 0 → 100644 +3 −0 Original line number Diff line number Diff line o Minor bugfixes (logging): - When logging a directory ownership mismatch, log the owning username correctly. Fixes bug 19578; bugfix on 0.2.2.29-beta. configure.ac +1 −0 Original line number Diff line number Diff line Loading @@ -1810,6 +1810,7 @@ if test "x$enable_gcc_warnings_advisory" != "xno"; then -Wselector-type-mismatch -Wsentinel -Wserialized-diagnostics -Wshadow -Wshift-count-negative -Wshift-count-overflow -Wshift-negative-value Loading src/common/util.c +7 −6 Original line number Diff line number Diff line Loading @@ -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?", Loading Loading @@ -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 */ Loading src/or/channeltls.c +2 −2 Original line number Diff line number Diff line Loading @@ -1901,8 +1901,8 @@ channel_tls_process_certs_cell(var_cell_t *cell, channel_tls_t *chan) } err: for (unsigned i = 0; i < ARRAY_LENGTH(certs); ++i) { tor_x509_cert_free(certs[i]); for (unsigned u = 0; u < ARRAY_LENGTH(certs); ++u) { tor_x509_cert_free(certs[u]); } certs_cell_free(cc); #undef ERR Loading src/or/circuitbuild.c +7 −7 Original line number Diff line number Diff line Loading @@ -1565,7 +1565,7 @@ choose_good_exit_server_general(int need_uptime, int need_capacity) int n_best_support=0; const or_options_t *options = get_options(); const smartlist_t *the_nodes; const node_t *node=NULL; const node_t *selected_node=NULL; connections = get_connection_array(); Loading Loading @@ -1692,7 +1692,7 @@ choose_good_exit_server_general(int need_uptime, int need_capacity) smartlist_add(supporting, (void*)node); }); node = node_sl_choose_by_bandwidth(supporting, WEIGHT_FOR_EXIT); selected_node = node_sl_choose_by_bandwidth(supporting, WEIGHT_FOR_EXIT); smartlist_free(supporting); } else { /* Either there are no pending connections, or no routers even seem to Loading Loading @@ -1730,8 +1730,8 @@ choose_good_exit_server_general(int need_uptime, int need_capacity) } } SMARTLIST_FOREACH_END(node); node = node_sl_choose_by_bandwidth(supporting, WEIGHT_FOR_EXIT); if (node) selected_node = node_sl_choose_by_bandwidth(supporting, WEIGHT_FOR_EXIT); if (selected_node) break; smartlist_clear(supporting); /* If we reach this point, we can't actually support any unhandled Loading @@ -1745,9 +1745,9 @@ choose_good_exit_server_general(int need_uptime, int need_capacity) } tor_free(n_supported); if (node) { log_info(LD_CIRC, "Chose exit server '%s'", node_describe(node)); return node; if (selected_node) { log_info(LD_CIRC, "Chose exit server '%s'", node_describe(selected_node)); return selected_node; } if (options->ExitNodes) { log_warn(LD_CIRC, Loading Loading
changes/bug19578 0 → 100644 +3 −0 Original line number Diff line number Diff line o Minor bugfixes (logging): - When logging a directory ownership mismatch, log the owning username correctly. Fixes bug 19578; bugfix on 0.2.2.29-beta.
configure.ac +1 −0 Original line number Diff line number Diff line Loading @@ -1810,6 +1810,7 @@ if test "x$enable_gcc_warnings_advisory" != "xno"; then -Wselector-type-mismatch -Wsentinel -Wserialized-diagnostics -Wshadow -Wshift-count-negative -Wshift-count-overflow -Wshift-negative-value Loading
src/common/util.c +7 −6 Original line number Diff line number Diff line Loading @@ -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?", Loading Loading @@ -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 */ Loading
src/or/channeltls.c +2 −2 Original line number Diff line number Diff line Loading @@ -1901,8 +1901,8 @@ channel_tls_process_certs_cell(var_cell_t *cell, channel_tls_t *chan) } err: for (unsigned i = 0; i < ARRAY_LENGTH(certs); ++i) { tor_x509_cert_free(certs[i]); for (unsigned u = 0; u < ARRAY_LENGTH(certs); ++u) { tor_x509_cert_free(certs[u]); } certs_cell_free(cc); #undef ERR Loading
src/or/circuitbuild.c +7 −7 Original line number Diff line number Diff line Loading @@ -1565,7 +1565,7 @@ choose_good_exit_server_general(int need_uptime, int need_capacity) int n_best_support=0; const or_options_t *options = get_options(); const smartlist_t *the_nodes; const node_t *node=NULL; const node_t *selected_node=NULL; connections = get_connection_array(); Loading Loading @@ -1692,7 +1692,7 @@ choose_good_exit_server_general(int need_uptime, int need_capacity) smartlist_add(supporting, (void*)node); }); node = node_sl_choose_by_bandwidth(supporting, WEIGHT_FOR_EXIT); selected_node = node_sl_choose_by_bandwidth(supporting, WEIGHT_FOR_EXIT); smartlist_free(supporting); } else { /* Either there are no pending connections, or no routers even seem to Loading Loading @@ -1730,8 +1730,8 @@ choose_good_exit_server_general(int need_uptime, int need_capacity) } } SMARTLIST_FOREACH_END(node); node = node_sl_choose_by_bandwidth(supporting, WEIGHT_FOR_EXIT); if (node) selected_node = node_sl_choose_by_bandwidth(supporting, WEIGHT_FOR_EXIT); if (selected_node) break; smartlist_clear(supporting); /* If we reach this point, we can't actually support any unhandled Loading @@ -1745,9 +1745,9 @@ choose_good_exit_server_general(int need_uptime, int need_capacity) } tor_free(n_supported); if (node) { log_info(LD_CIRC, "Chose exit server '%s'", node_describe(node)); return node; if (selected_node) { log_info(LD_CIRC, "Chose exit server '%s'", node_describe(selected_node)); return selected_node; } if (options->ExitNodes) { log_warn(LD_CIRC, Loading