From b17f0465c7c38cab2f1f4ad0fc25d64d5cd175e7 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Thu, 23 Jun 2016 21:29:00 +0200 Subject: Drop deprecated "-diriv" option The DirIV feature flag is already mandatory, dropping the command line option is the final step. --- main.go | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 6ed9271..20c4d8b 100644 --- a/main.go +++ b/main.go @@ -42,7 +42,7 @@ const ( type argContainer struct { debug, init, zerokey, fusedebug, openssl, passwd, foreground, version, - plaintextnames, quiet, diriv, emenames, gcmiv128, nosyslog, wpanic, + plaintextnames, quiet, emenames, gcmiv128, nosyslog, wpanic, longnames, allow_other, ro bool masterkey, mountpoint, cipherdir, cpuprofile, config, extpass, memprofile string @@ -77,7 +77,7 @@ func initDir(args *argContainer) { os.Exit(ERREXIT_INIT) } - if args.diriv && !args.plaintextnames { + if !args.plaintextnames { // Create gocryptfs.diriv in the root dir err = nametransform.WriteDirIV(args.cipherdir) if err != nil { @@ -174,7 +174,6 @@ func main() { flagSet.BoolVar(&args.plaintextnames, "plaintextnames", false, "Do not encrypt file names") flagSet.BoolVar(&args.quiet, "q", false, "") flagSet.BoolVar(&args.quiet, "quiet", false, "Quiet - silence informational messages") - flagSet.BoolVar(&args.diriv, "diriv", true, "Use per-directory file name IV") flagSet.BoolVar(&args.emenames, "emenames", true, "Use EME filename encryption. This option implies diriv.") flagSet.BoolVar(&args.gcmiv128, "gcmiv128", true, "Use an 128-bit IV for GCM encryption instead of Go's default of 96 bits") flagSet.BoolVar(&args.nosyslog, "nosyslog", false, "Do not redirect output to syslog when running in the background") @@ -370,7 +369,6 @@ func initFuseFrontend(key []byte, args argContainer, confFile *configfile.ConfFi Masterkey: key, OpenSSL: args.openssl, PlaintextNames: args.plaintextnames, - DirIV: args.diriv, EMENames: args.emenames, GCMIV128: args.gcmiv128, LongNames: args.longnames, @@ -379,17 +377,11 @@ func initFuseFrontend(key []byte, args argContainer, confFile *configfile.ConfFi if confFile != nil { // Settings from the config file override command line args frontendArgs.PlaintextNames = confFile.IsFeatureFlagSet(configfile.FlagPlaintextNames) - frontendArgs.DirIV = confFile.IsFeatureFlagSet(configfile.FlagDirIV) frontendArgs.EMENames = confFile.IsFeatureFlagSet(configfile.FlagEMENames) frontendArgs.GCMIV128 = confFile.IsFeatureFlagSet(configfile.FlagGCMIV128) } - // EMENames implies DirIV, both on the command line and in the config file. - if frontendArgs.EMENames { - frontendArgs.DirIV = true - } - // PlainTexnames disables both EMENames and DirIV + // PlainTexnames disables EMENames if frontendArgs.PlaintextNames { - frontendArgs.DirIV = false frontendArgs.EMENames = false } jsonBytes, _ := json.MarshalIndent(frontendArgs, "", "\t") -- cgit v1.2.3