Opened 2 years ago

Closed 20 months ago

#22703 closed enhancement (implemented)

Add a KeyDirectory option to override location of $datadir/keys, and/or a cachedir option to override location of cached files.

Reported by: nickm Owned by: nickm
Priority: Medium Milestone: Tor: 0.3.3.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: sponsor8-maybe, configuration, torrc, review-group-26, review-group-27
Cc: Actual Points: 1
Parent ID: #7176 Points: 2
Reviewer: ahf Sponsor: Sponsor8-can


It is at least mildly naughty how Tor currently uses the same DataDirectory for both persistent secret things (keys), persistent sensitive things (the state file), runtime stuff (the lock file), and cached objects (cached-*). Perhaps we should provide options to split these up?

This might help a bit with memory usage on platforms where /var is a tmpfs. In #7176, there was an openwrt patch that changed the key directory to a hardcoded path, but that's obviously not mergeable in mainline tor.

Child Tickets

#24268defectclosedKeep parts of data directory in /var/cache instead of /var/lib
#24272defectclosednickmAdd a CacheDirectory option

Change History (11)

comment:1 Changed 2 years ago by nickm

Sponsor: Sponsor8-can

comment:2 Changed 23 months ago by nickm

Milestone: Tor: 0.3.2.x-finalTor: 0.3.3.x-final

comment:3 Changed 21 months ago by nickm

Actual Points: 1
Status: newneeds_review

I've done an implementation of this in a more_directories branch.

comment:4 Changed 21 months ago by nickm

Owner: set to nickm
Status: needs_reviewaccepted

comment:5 Changed 21 months ago by nickm

Status: acceptedneeds_review

comment:6 Changed 20 months ago by nickm

Keywords: review-group-26 added

Creating review-group-26.

comment:7 Changed 20 months ago by dgoulet

This is pretty big, can you make an oniongit merge request please nickm?

comment:8 Changed 20 months ago by nickm

Reviewer: ahf is a merge request if you'd like to review at oniongit.

comment:9 Changed 20 months ago by ahf

Status: needs_reviewmerge_ready

The patches for this feature and the refactoring around it looks good - there is a small typo in the man page update where I've left a comment.

comment:10 Changed 20 months ago by nickm

Keywords: review-group-27 added

comment:11 Changed 20 months ago by nickm

Resolution: implemented
Status: merge_readyclosed

Thanks for the review! Fixed that issue and merged to master.

Note: See TracTickets for help on using tickets.