[tor-bugs] #18320 [Core Tor/Tor]: Clear old entries from the key-pinning journal file
Tor Bug Tracker & Wiki
blackhole at torproject.org
Tue Aug 2 18:25:53 UTC 2016
#18320: Clear old entries from the key-pinning journal file
-------------------------------------------------+-------------------------
Reporter: teor | Owner: andrea
Type: defect | Status:
Priority: Medium | needs_revision
Component: Core Tor/Tor | Milestone: Tor:
Severity: Normal | 0.2.9.x-final
Keywords: tor-dos, TorCoreTeam201607, review- | Version:
group-3, review-group-6 | Resolution:
Parent ID: #17293 | Actual Points:
Reviewer: dgoulet | Points: 3
| Sponsor:
| SponsorU-can
-------------------------------------------------+-------------------------
Changes (by nickm):
* status: merge_ready => needs_revision
Comment:
Quick comments:
* I think that we should use a temporary file instead of truncate-and-
rewrite. In nearly every case where we haven't used a temporary file in
the past, somebody *did* crash at just the wrong time and lose all their
data. :p
* Can the unit test verify that the correct lines get removed? FWICT it
only verifies that the correct number of lines is removed, which is a
little scary.
* Suggestion: can we use the NULL-object pattern to do fewer "if
(pruner)" checks? In other words, how about we just define all these
functions to be no-ops or whatever when pruner is NULL? (I'm thinking of
keypin_remove_entry and keypin_add_line_to_pruner.)
otherwise looks fine
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/18320#comment:32>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list