summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-01-26 12:30:59 -0500
committerNick Mathewson <nickm@torproject.org>2018-01-26 12:39:38 -0500
commitaedcb1644d984fcca8d0cf54145a2cf0f389f265 (patch)
tree995dcc278166f98ca2d874964c8d32c047d99b41 /src
parent7a74b3663fdaa40fc84e48990d15953a8f46a2bf (diff)
downloadtor-aedcb1644d984fcca8d0cf54145a2cf0f389f265.tar.gz
tor-aedcb1644d984fcca8d0cf54145a2cf0f389f265.zip
Improve the keypin-loading log message to be a bit less scary.
Diffstat (limited to 'src')
-rw-r--r--src/or/keypin.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/keypin.c b/src/or/keypin.c
index 1698dc184f..66525cbf90 100644
--- a/src/or/keypin.c
+++ b/src/or/keypin.c
@@ -289,8 +289,7 @@ static int keypin_journal_fd = -1;
int
keypin_open_journal(const char *fname)
{
- /* O_SYNC ??*/
- int fd = tor_open_cloexec(fname, O_WRONLY|O_CREAT|O_BINARY, 0600);
+ int fd = tor_open_cloexec(fname, O_WRONLY|O_CREAT|O_BINARY|O_SYNC, 0600);
if (fd < 0)
goto err;
@@ -417,10 +416,11 @@ keypin_load_journal_impl(const char *data, size_t size)
++n_entries;
}
- int severity = (n_corrupt_lines || n_duplicates) ? LOG_WARN : LOG_INFO;
+ int severity = (n_corrupt_lines || n_duplicates) ? LOG_NOTICE : LOG_INFO;
tor_log(severity, LD_DIRSERV,
"Loaded %d entries from keypin journal. "
- "Found %d corrupt lines, %d duplicates, and %d conflicts.",
+ "Found %d corrupt lines (ignored), %d duplicates (harmless), "
+ "and %d conflicts (resolved in favor or more recent entry).",
n_entries, n_corrupt_lines, n_duplicates, n_conflicts);
return 0;