libgocryptfs/internal/fusefrontend/args.go
Jakob Unterwurzacher 719693ec5d fusefrontend[_reverse]: move crypto init up to caller
Both fusefrontend and fusefrontend_reverse were doing
essentially the same thing, move it into main's
initFuseFrontend.

A side-effect is that we have a reference to cryptocore
in main, which will help with wiping the keys on exit
(https://github.com/rfjakob/gocryptfs/issues/211).
2018-02-18 11:21:58 +01:00

34 lines
1.3 KiB
Go

package fusefrontend
import (
"github.com/hanwen/go-fuse/fuse"
)
// Args is a container for arguments that are passed from main() to fusefrontend
type Args struct {
// Cipherdir is the backing storage directory (absolute path).
// For reverse mode, Cipherdir actually contains *plaintext* files.
Cipherdir string
PlaintextNames bool
LongNames bool
// Should we chown a file after it has been created?
// This only makes sense if (1) allow_other is set and (2) we run as root.
PreserveOwner bool
// Should we force ownership to be presented with a given user and group?
// This only makes sense if allow_other is set. In *most* cases, it also
// only makes sense with PreserveOwner set, but can also make sense without
// PreserveOwner if the underlying filesystem acting as backing store
// enforces ownership itself.
ForceOwner *fuse.Owner
// ConfigCustom is true when the user select a non-default config file
// location. If it is false, reverse mode maps ".gocryptfs.reverse.conf"
// to "gocryptfs.conf" in the plaintext dir.
ConfigCustom bool
// NoPrealloc disables automatic preallocation before writing
NoPrealloc bool
// Try to serialize read operations, "-serialize_reads"
SerializeReads bool
// Force decode even if integrity check fails (openSSL only)
ForceDecode bool
}