summaryrefslogtreecommitdiff
path: root/src/or/rendservice.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r--src/or/rendservice.c36
1 files changed, 20 insertions, 16 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 4902580160..d31081ae8f 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -294,8 +294,8 @@ rend_add_service(rend_service_t *service)
}
}
smartlist_add(rend_service_list, service);
- log_debug(LD_REND,"Configuring service with directory \"%s\"",
- service->directory);
+ log_debug(LD_REND,"Configuring service with directory %s",
+ rend_service_escaped_dir(service));
for (i = 0; i < smartlist_len(service->ports); ++i) {
p = smartlist_get(service->ports, i);
if (!(p->is_unix_addr)) {
@@ -512,7 +512,8 @@ rend_config_services(const or_options_t *options, int validate_only)
}
log_info(LD_CONFIG,
"HiddenServiceAllowUnknownPorts=%d for %s",
- (int)service->allow_unknown_ports, service->directory);
+ (int)service->allow_unknown_ports,
+ rend_service_escaped_dir(service));
} else if (!strcasecmp(line->key,
"HiddenServiceDirGroupReadable")) {
service->dir_group_readable = (int)tor_parse_long(line->value,
@@ -526,7 +527,8 @@ rend_config_services(const or_options_t *options, int validate_only)
}
log_info(LD_CONFIG,
"HiddenServiceDirGroupReadable=%d for %s",
- service->dir_group_readable, service->directory);
+ service->dir_group_readable,
+ rend_service_escaped_dir(service));
} else if (!strcasecmp(line->key, "HiddenServiceMaxStreams")) {
service->max_streams_per_circuit = (int)tor_parse_long(line->value,
10, 0, 65535, &ok, NULL);
@@ -539,7 +541,8 @@ rend_config_services(const or_options_t *options, int validate_only)
}
log_info(LD_CONFIG,
"HiddenServiceMaxStreams=%d for %s",
- service->max_streams_per_circuit, service->directory);
+ service->max_streams_per_circuit,
+ rend_service_escaped_dir(service));
} else if (!strcasecmp(line->key, "HiddenServiceMaxStreamsCloseCircuit")) {
service->max_streams_close_circuit = (int)tor_parse_long(line->value,
10, 0, 1, &ok, NULL);
@@ -553,7 +556,8 @@ rend_config_services(const or_options_t *options, int validate_only)
}
log_info(LD_CONFIG,
"HiddenServiceMaxStreamsCloseCircuit=%d for %s",
- (int)service->max_streams_close_circuit, service->directory);
+ (int)service->max_streams_close_circuit,
+ rend_service_escaped_dir(service));
} else if (!strcasecmp(line->key, "HiddenServiceNumIntroductionPoints")) {
service->n_intro_points_wanted =
(unsigned int) tor_parse_long(line->value, 10,
@@ -569,7 +573,8 @@ rend_config_services(const or_options_t *options, int validate_only)
return -1;
}
log_info(LD_CONFIG, "HiddenServiceNumIntroductionPoints=%d for %s",
- service->n_intro_points_wanted, service->directory);
+ service->n_intro_points_wanted,
+ rend_service_escaped_dir(service));
} else if (!strcasecmp(line->key, "HiddenServiceAuthorizeClient")) {
/* Parse auth type and comma-separated list of client names and add a
* rend_authorized_client_t for each client to the service's list
@@ -1195,8 +1200,8 @@ rend_service_load_all_keys(const smartlist_t *service_list)
SMARTLIST_FOREACH_BEGIN(s_list, rend_service_t *, s) {
if (s->private_key)
continue;
- log_info(LD_REND, "Loading hidden-service keys from \"%s\"",
- s->directory);
+ log_info(LD_REND, "Loading hidden-service keys from %s",
+ rend_service_escaped_dir(s));
if (rend_service_load_keys(s) < 0)
return -1;
@@ -1274,7 +1279,8 @@ rend_service_load_keys(rend_service_t *s)
if (s->dir_group_readable) {
/* Only new dirs created get new opts, also enforce group read. */
if (chmod(s->directory, 0750)) {
- log_warn(LD_FS,"Unable to make %s group-readable.", s->directory);
+ log_warn(LD_FS,"Unable to make %s group-readable.",
+ rend_service_escaped_dir(s));
}
}
#endif
@@ -3068,8 +3074,7 @@ rend_service_intro_has_opened(origin_circuit_t *circuit)
log_info(LD_GENERAL,
"Couldn't send introduction request for service %s on circuit %u",
serviceid, (unsigned)circuit->base_.n_circ_id);
- reason = END_CIRC_REASON_INTERNAL;
- goto err;
+ goto done;
}
/* We've attempted to use this circuit */
@@ -3231,8 +3236,7 @@ rend_service_rendezvous_has_opened(origin_circuit_t *circuit)
buf, REND_COOKIE_LEN+DH_KEY_LEN+DIGEST_LEN,
circuit->cpath->prev)<0) {
log_warn(LD_GENERAL, "Couldn't send RENDEZVOUS1 cell.");
- reason = END_CIRC_REASON_INTERNAL;
- goto err;
+ goto done;
}
crypto_dh_free(hop->rend_dh_handshake_state);
@@ -4017,8 +4021,8 @@ rend_service_dump_stats(int severity)
for (i=0; i < smartlist_len(rend_service_list); ++i) {
service = smartlist_get(rend_service_list, i);
- tor_log(severity, LD_GENERAL, "Service configured in \"%s\":",
- service->directory);
+ tor_log(severity, LD_GENERAL, "Service configured in %s:",
+ rend_service_escaped_dir(service));
for (j=0; j < smartlist_len(service->intro_nodes); ++j) {
intro = smartlist_get(service->intro_nodes, j);
safe_name = safe_str_client(intro->extend_info->nickname);