2016-02-06 19:27:59 +01:00
|
|
|
package fusefrontend
|
2015-11-28 16:52:57 +01:00
|
|
|
|
2016-09-20 21:58:04 +02:00
|
|
|
import (
|
2020-05-17 14:18:23 +02:00
|
|
|
"github.com/hanwen/go-fuse/v2/fuse"
|
2016-09-20 21:58:04 +02:00
|
|
|
)
|
|
|
|
|
2016-10-02 06:14:18 +02:00
|
|
|
// Args is a container for arguments that are passed from main() to fusefrontend
|
2015-11-28 16:52:57 +01:00
|
|
|
type Args struct {
|
2017-04-01 17:19:15 +02:00
|
|
|
// Cipherdir is the backing storage directory (absolute path).
|
|
|
|
// For reverse mode, Cipherdir actually contains *plaintext* files.
|
2015-11-29 21:55:20 +01:00
|
|
|
Cipherdir string
|
2015-11-28 16:52:57 +01:00
|
|
|
PlaintextNames bool
|
2016-02-06 22:54:14 +01:00
|
|
|
LongNames bool
|
2016-06-26 19:18:13 +02:00
|
|
|
// 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
|
2017-05-30 23:01:06 +02:00
|
|
|
// 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
|
2016-10-08 20:57:38 +02:00
|
|
|
// 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
|
2016-11-24 22:36:04 +01:00
|
|
|
// NoPrealloc disables automatic preallocation before writing
|
|
|
|
NoPrealloc bool
|
2017-04-08 02:09:28 +02:00
|
|
|
// Force decode even if integrity check fails (openSSL only)
|
|
|
|
ForceDecode bool
|
2019-02-16 21:55:54 +01:00
|
|
|
// Exclude is a list of paths to make inaccessible, starting match at
|
|
|
|
// the filesystem root
|
2018-08-11 23:26:49 +02:00
|
|
|
Exclude []string
|
2019-02-16 21:55:54 +01:00
|
|
|
// ExcludeWildcards is a list of paths to make inaccessible, matched
|
|
|
|
// anywhere, and supporting wildcards
|
|
|
|
ExcludeWildcard []string
|
|
|
|
// ExcludeFrom is a list of files from which to read exclusion patterns
|
|
|
|
// (with wildcard syntax)
|
|
|
|
ExcludeFrom []string
|
2020-10-18 21:05:44 +02:00
|
|
|
// Suid is true if the filesystem has been mounted with the "-suid" flag.
|
|
|
|
// If it is false, we can ignore the GETXATTR "security.capability" calls,
|
|
|
|
// which are a performance problem for writes. See
|
2021-08-30 11:31:01 +02:00
|
|
|
// https://github.com/rfjakob/gocryptfs/issues/515 for details.
|
2020-10-18 21:05:44 +02:00
|
|
|
Suid bool
|
2020-12-08 08:27:23 +01:00
|
|
|
// Enable the FUSE kernel_cache option
|
|
|
|
KernelCache bool
|
2021-03-07 17:22:29 +01:00
|
|
|
// SharedStorage disables caching & hard link tracking,
|
|
|
|
// enabled via cli flag "-sharedstorage"
|
|
|
|
SharedStorage bool
|
2021-08-16 18:40:48 +02:00
|
|
|
// OneFileSystem disables crossing filesystem boundaries,
|
|
|
|
// like rsync's `--one-file-system` does.
|
|
|
|
// Only applicable to reverse mode.
|
|
|
|
OneFileSystem bool
|
2021-08-20 10:57:26 +02:00
|
|
|
// DeterministicNames disables gocryptfs.diriv files
|
|
|
|
DeterministicNames bool
|
2015-11-28 16:52:57 +01:00
|
|
|
}
|