main: rename "-o" option to "-ko"
This prevents confusion with the "-o" options that is passed by mount(1) at the end of the command line.
This commit is contained in:
parent
17df345103
commit
25a8802403
@ -65,6 +65,15 @@ to mount the gocryptfs filesytem without user interaction.
|
|||||||
**-init**
|
**-init**
|
||||||
: Initialize encrypted directory
|
: Initialize encrypted directory
|
||||||
|
|
||||||
|
**-ko**
|
||||||
|
: Pass additonal mount options to the kernel (comma-separated list).
|
||||||
|
FUSE filesystems are mounted with "nodev,nosuid" by default. If gocryptfs
|
||||||
|
runs as root, you can enable device files by passing the opposite mount option,
|
||||||
|
"dev", and if you want to enable suid-binaries, pass "suid".
|
||||||
|
"ro" (equivalent to passing the "-ro" option) and "noexec" may also be
|
||||||
|
interesting. For a complete list see the section
|
||||||
|
`FILESYSTEM-INDEPENDENT MOUNT OPTIONS` in mount(8).
|
||||||
|
|
||||||
**-longnames**
|
**-longnames**
|
||||||
: Store names longer than 176 bytes in extra files (default true)
|
: Store names longer than 176 bytes in extra files (default true)
|
||||||
This flag is useful when recovering old gocryptfs filesystems using
|
This flag is useful when recovering old gocryptfs filesystems using
|
||||||
@ -93,15 +102,6 @@ continue be printed to stdout and stderr.
|
|||||||
: Send USR1 to the specified process after successful mount. This is
|
: Send USR1 to the specified process after successful mount. This is
|
||||||
used internally for daemonization.
|
used internally for daemonization.
|
||||||
|
|
||||||
**-o**
|
|
||||||
: Pass additonal mount options to the kernel (comma-separated list).
|
|
||||||
FUSE filesystems are mounted with "nodev,nosuid" by default. If gocryptfs
|
|
||||||
runs as root, you can enable device files by passing the opposite mount option,
|
|
||||||
"dev", and if you want to enable suid-binaries, pass "suid".
|
|
||||||
"ro" (equivalent to passing the "-ro" option) and "noexec" may also be
|
|
||||||
interesting. For a complete list see the section
|
|
||||||
`FILESYSTEM-INDEPENDENT MOUNT OPTIONS` in mount(8).
|
|
||||||
|
|
||||||
**-openssl bool/"auto"**
|
**-openssl bool/"auto"**
|
||||||
: Use OpenSSL instead of built-in Go crypto (default "auto"). Using
|
: Use OpenSSL instead of built-in Go crypto (default "auto"). Using
|
||||||
built-in crypto is 4x slower unless your CPU has AES instructions and
|
built-in crypto is 4x slower unless your CPU has AES instructions and
|
||||||
|
@ -16,7 +16,7 @@ type argContainer struct {
|
|||||||
plaintextnames, quiet, nosyslog, wpanic,
|
plaintextnames, quiet, nosyslog, wpanic,
|
||||||
longnames, allow_other, ro, reverse, aessiv, nonempty bool
|
longnames, allow_other, ro, reverse, aessiv, nonempty bool
|
||||||
masterkey, mountpoint, cipherdir, cpuprofile, extpass,
|
masterkey, mountpoint, cipherdir, cpuprofile, extpass,
|
||||||
memprofile, o string
|
memprofile, ko string
|
||||||
// Configuration file name override
|
// Configuration file name override
|
||||||
config string
|
config string
|
||||||
notifypid, scryptn int
|
notifypid, scryptn int
|
||||||
@ -61,7 +61,7 @@ func parseCliOpts() (args argContainer) {
|
|||||||
flagSet.StringVar(&args.memprofile, "memprofile", "", "Write memory profile to specified file")
|
flagSet.StringVar(&args.memprofile, "memprofile", "", "Write memory profile to specified file")
|
||||||
flagSet.StringVar(&args.config, "config", "", "Use specified config file instead of CIPHERDIR/gocryptfs.conf")
|
flagSet.StringVar(&args.config, "config", "", "Use specified config file instead of CIPHERDIR/gocryptfs.conf")
|
||||||
flagSet.StringVar(&args.extpass, "extpass", "", "Use external program for the password prompt")
|
flagSet.StringVar(&args.extpass, "extpass", "", "Use external program for the password prompt")
|
||||||
flagSet.StringVar(&args.o, "o", "", "Pass additional mount options to the kernel, comma-separated list")
|
flagSet.StringVar(&args.ko, "ko", "", "Pass additional options directly to the kernel, comma-separated list")
|
||||||
flagSet.IntVar(&args.notifypid, "notifypid", 0, "Send USR1 to the specified process after "+
|
flagSet.IntVar(&args.notifypid, "notifypid", 0, "Send USR1 to the specified process after "+
|
||||||
"successful mount - used internally for daemonization")
|
"successful mount - used internally for daemonization")
|
||||||
flagSet.IntVar(&args.scryptn, "scryptn", configfile.ScryptDefaultLogN, "scrypt cost parameter logN. "+
|
flagSet.IntVar(&args.scryptn, "scryptn", configfile.ScryptDefaultLogN, "scrypt cost parameter logN. "+
|
||||||
|
6
mount.go
6
mount.go
@ -185,9 +185,9 @@ func initFuseFrontend(key []byte, args *argContainer, confFile *configfile.ConfF
|
|||||||
}
|
}
|
||||||
// Add additional mount options (if any) after the stock ones, so the user has
|
// Add additional mount options (if any) after the stock ones, so the user has
|
||||||
// a chance to override them.
|
// a chance to override them.
|
||||||
if args.o != "" {
|
if args.ko != "" {
|
||||||
parts := strings.Split(args.o, ",")
|
parts := strings.Split(args.ko, ",")
|
||||||
tlog.Debug.Printf("Adding -o mount options: %v", parts)
|
tlog.Debug.Printf("Adding -ko mount options: %v", parts)
|
||||||
mOpts.Options = append(mOpts.Options, parts...)
|
mOpts.Options = append(mOpts.Options, parts...)
|
||||||
}
|
}
|
||||||
srv, err := fuse.NewServer(conn.RawFS(), args.mountpoint, &mOpts)
|
srv, err := fuse.NewServer(conn.RawFS(), args.mountpoint, &mOpts)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user