summaryrefslogtreecommitdiff
path: root/src/or/conscache.c
AgeCommit message (Collapse)Author
2018-04-06crypto: Refactor (P)RNG functionality into new crypto_rand module.Isis Lovecruft
* ADD new /src/common/crypto_rand.[ch] module. * ADD new /src/common/crypto_util.[ch] module (contains the memwipe() function, since all crypto_* modules need this). * FIXES part of #24658: https://bugs.torproject.org/24658
2017-12-08Merge branch 'macro_free_v2_squashed'Nick Mathewson
2017-12-08Change the free macro convention in the rest of src/or/*.hNick Mathewson
2017-12-05Merge branch 'more_directories_squashed'Nick Mathewson
2017-12-05New accessors for keydir/cachedir accessNick Mathewson
This patch is a result of auditing all of our uses of get_datadir_fname() and its kin, and dividing them into cache vs keys vs other data. The new get_keydir_fname() and get_cachedir_fname() functions don't actually do anything new yet.
2017-11-21Merge branches 'bug24099_031' and 'bug24086_031' into maint-0.3.2Nick Mathewson
2017-11-21add an explanatory comment about the error codesNick Mathewson
2017-11-20Recover better from empty/invalid storagedir filesNick Mathewson
If we can't read a file because of an FS issue, we say "we can't read that" and move on. But if we can't read it because it's empty, because it has no labels, or because its labels are misformatted, we should remove it. Fixes bug 24099; bugfix on 0.3.1.1-alpha.
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-09-0422752: Improve comments to explain why we're doing this fix.Nick Mathewson
Based on questions and comments from dgoulet, I've tried to fill in the reasoning about why these functions work in the way that they do, so that it will be easier for future programmers to understand why this code exists and works the way it does.
2017-08-29On windows, allow many entries in conscache directoriesNick Mathewson
Since we can't be sure that we can unlink enough files on windows here, let's let the number of permitted entries grow huge if it really must. We do this by letting the storagedir hold lots of entries, but still trying to keep the number of entries under the configured limit. We also have to tell consdiffmgr not to freak out if it can't actually remove enough entries. Part of a fix for bug 22752
2017-08-29On windows, don't force-unlink active conscache objects.Nick Mathewson
Part of a fix for bug 22752: We can't unlink these because Windows doesn't allow you to unlink an in-use file.
2017-04-27Functionality to ensure there is space to add files to cache.Nick Mathewson
2017-04-27New force-delete option on consensus_cache_delete_pending()Nick Mathewson
If we're out of file space in the storage directory, we'll need to get rid of old files fast.
2017-04-25Configure sandbox using consdiffmgr; free cdm on exit.Nick Mathewson
2017-04-24Add handle support to consensus_cache_entry_tNick Mathewson
This will allow us to have weak references to cache entries.
2017-04-15conscache.c: do not match entries that are slated for removal.Nick Mathewson
2017-04-06Tests for simple cases of conscache code.Nick Mathewson
2017-04-06Add a 'consensus cache' type on top of storagedir.Nick Mathewson
Every file in the cache is labeled. The labels are held in memory; the bodies are mapped on demand.