summaryrefslogtreecommitdiffhomepage
path: root/Storage.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-08-11 20:44:07 -0400
committerJoey Hess <joeyh@joeyh.name>2016-08-11 20:44:07 -0400
commita3834e558cf6ae04826b44e65a02ee22286f7952 (patch)
tree571159729a9392579aa993e3f3da8dd58745c0b3 /Storage.hs
parentab3594dacb0461ae5e253544f65c3e3d50eb721d (diff)
downloadkeysafe-a3834e558cf6ae04826b44e65a02ee22286f7952.tar.gz
write via temp file
avoids short reads, and also if a backup program came along while the write was happening, avoids short backups
Diffstat (limited to 'Storage.hs')
-rw-r--r--Storage.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Storage.hs b/Storage.hs
index 275f3fe..fc9e9ed 100644
--- a/Storage.hs
+++ b/Storage.hs
@@ -11,7 +11,8 @@ data Storage = Storage
{ storeShard :: StorableObjectIdent -> Shard -> IO StoreResult
, retrieveShard :: ShardNum -> StorableObjectIdent -> IO RetrieveResult
, obscureShards :: IO ObscureResult
- -- ^ run after making some changes, to avoid correlation attacks
+ -- ^ run after making some calls to storeShard/retrieveShard,
+ -- to avoid correlation attacks
}
data StoreResult = StoreSuccess | StoreFailure String