summaryrefslogtreecommitdiff
path: root/src/feature/rend
diff options
context:
space:
mode:
authorNeel Chauhan <neel@neelc.org>2020-07-24 18:23:50 -0700
committerNick Mathewson <nickm@torproject.org>2020-07-30 10:46:15 -0400
commit67a62ccf51f46bde75e0675b1ee19c024152f088 (patch)
treec62c1a86300dea0c1aa3767dffad04b47fc3a7bb /src/feature/rend
parentc212578bf05138801597dcce23f52780c9b7dbb3 (diff)
downloadtor-67a62ccf51f46bde75e0675b1ee19c024152f088.tar.gz
tor-67a62ccf51f46bde75e0675b1ee19c024152f088.zip
Use write_str_if_not_equal() for onion services
Diffstat (limited to 'src/feature/rend')
-rw-r--r--src/feature/rend/rendservice.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/feature/rend/rendservice.c b/src/feature/rend/rendservice.c
index 1ac88d0eb7..8e1a22fb39 100644
--- a/src/feature/rend/rendservice.c
+++ b/src/feature/rend/rendservice.c
@@ -1554,7 +1554,7 @@ rend_service_load_keys(rend_service_t *s)
fname = rend_service_path(s, hostname_fname);
tor_snprintf(buf, sizeof(buf),"%s.onion\n", s->service_id);
- if (write_str_to_file(fname,buf,0)<0) {
+ if (write_str_to_file_if_not_equal(fname, buf)) {
log_warn(LD_CONFIG, "Could not write onion address to hostname file.");
goto err;
}