* the file between stat() and chmod(), a potential race exists.
*
* Several suggestions taken from:
- * https://developer.apple.com/library/mac/documentation/Security/Conceptual/SecureCodingGuide/Articles/RaceConditions.html
+ * https://developer.apple.com/library/mac/documentation/
+ * Security/Conceptual/SecureCodingGuide/Articles/RaceConditions.html
*/
/* Open directory.
tor_assert(filename);
#ifdef _WIN32
/* Might consider using GetFullPathName() as described here:
- * http://etutorials.org/Programming/secure+programming/Chapter+3.+Input+Validation/3.7+Validating+Filenames+and+Paths/
+ * http://etutorials.org/Programming/secure+programming/
+ * Chapter+3.+Input+Validation/3.7+Validating+Filenames+and+Paths/
*/
return tor_strdup(filename);
#else
}
/** Return true iff the given address can be used to extend to. */
-int extend_info_addr_is_allowed(const tor_addr_t *addr)
+int
+extend_info_addr_is_allowed(const tor_addr_t *addr)
{
tor_assert(addr);
disallow:
return 0;
}
+
ipv4_traffic = 1, ipv6_traffic = 0, prefer_ipv6 = 0,
cache_ipv4 = 1, use_cached_ipv4 = 0,
cache_ipv6 = 0, use_cached_ipv6 = 0,
- prefer_ipv6_automap = 1, world_writable = 0, group_writable = 0, relax_dirmode_check = 0,
+ prefer_ipv6_automap = 1, world_writable = 0, group_writable = 0,
+ relax_dirmode_check = 0,
has_used_unix_socket_only_option = 0;
smartlist_split_string(elts, ports->value, NULL,
if ( has_used_unix_socket_only_option && ! unix_socket_path) {
log_warn(LD_CONFIG, "You have a %sPort entry with GroupWritable, "
- "WorldWritable, or RelaxDirModeCheck, but it is not a unix socket.", portname);
+ "WorldWritable, or RelaxDirModeCheck, but it is not a "
+ "unix socket.", portname);
goto err;
}
conn_type_to_string(conn->type),
conn_state_to_string(conn->type, conn->state),
(int)conn->s, (int)conn->linked,
- (conn->type == CONN_TYPE_AP && TO_EDGE_CONN(conn)->is_dns_request),
+ (conn->type == CONN_TYPE_AP &&
+ TO_EDGE_CONN(conn)->is_dns_request),
conn->marked_for_close_file ? conn->marked_for_close_file : "-",
conn->marked_for_close
);
smartlist_free(responsible);
return result;
}
+
const char *service_id,
const char *secret_id_part);
int hid_serv_get_responsible_directories(smartlist_t *responsible_dirs,
- const char *id);
+ const char *id);
int hid_serv_acting_as_directory(void);
MOCK_DECL(int, hid_serv_responsible_for_desc_id, (const char *id));
nodelist_refresh_countries();
}
+