diff options
author | Jakob Unterwurzacher | 2017-04-01 17:19:15 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2017-04-01 17:19:15 +0200 |
commit | 778c955eea1fdc16666f51f6f0a2fab0f580dbf0 (patch) | |
tree | f956c11bbc8a055dc9b72a842487bbb6ed4cbbc3 /internal/fusefrontend | |
parent | e87aebb835b91ba66f288030ee3510df42b860a9 (diff) |
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
Diffstat (limited to 'internal/fusefrontend')
-rw-r--r-- | internal/fusefrontend/args.go | 4 |
1 files changed, 3 insertions, 1 deletions
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 |