From 778c955eea1fdc16666f51f6f0a2fab0f580dbf0 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sat, 1 Apr 2017 17:19:15 +0200 Subject: fusefrontend_reverse: switch to stable inode numbers The volatile inode numbers that we used before cause "find" to complain and error out. Virtual inode numbers are derived from their parent file inode number by adding 10^19, which is hopefully large enough no never cause problems in practice. If the backing directory contains inode numbers higher than that, stat() on these files will return EOVERFLOW. Example directory lising after this change: $ ls -i 926473 gocryptfs.conf 1000000000000926466 gocryptfs.diriv 944878 gocryptfs.longname.hmZojMqC6ns47eyVxLlH2ailKjN9bxfosi3C-FR8mjA 1000000000000944878 gocryptfs.longname.hmZojMqC6ns47eyVxLlH2ailKjN9bxfosi3C-FR8mjA.name 934408 Tdfbf02CKsTaGVYnAsSypA --- internal/fusefrontend/args.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'internal/fusefrontend') diff --git a/internal/fusefrontend/args.go b/internal/fusefrontend/args.go index 4029913..ddfb9dc 100644 --- a/internal/fusefrontend/args.go +++ b/internal/fusefrontend/args.go @@ -6,7 +6,9 @@ import ( // Args is a container for arguments that are passed from main() to fusefrontend type Args struct { - Masterkey []byte + Masterkey []byte + // Cipherdir is the backing storage directory (absolute path). + // For reverse mode, Cipherdir actually contains *plaintext* files. Cipherdir string CryptoBackend cryptocore.AEADTypeEnum PlaintextNames bool -- cgit v1.2.3