From a3834e558cf6ae04826b44e65a02ee22286f7952 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 11 Aug 2016 20:44:07 -0400 Subject: write via temp file avoids short reads, and also if a backup program came along while the write was happening, avoids short backups --- keysafe.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'keysafe.hs') diff --git a/keysafe.hs b/keysafe.hs index 02dc18a..94846f0 100644 --- a/keysafe.hs +++ b/keysafe.hs @@ -45,6 +45,7 @@ retrievedemo = do let l = drop 1 $ zip [1..] (getIdents sis) shards <- map (\(RetrieveSuccess s) -> s) <$> mapM (uncurry (retrieveShard localFiles)) l + _ <- obscureShards localFiles let esk = combineShards tunables shards kek <- genKeyEncryptionKey tunables name password -- TODO: need to solve the encryption puzzle -- cgit v1.2.3