From 2050c7f3b3822a4a3329d4ba5b146d269ef05b4d Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 25 Sep 2016 15:05:09 +0200 Subject: reverse: add gcmsiv flag and associated tests --- init_dir.go | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'init_dir.go') diff --git a/init_dir.go b/init_dir.go index fac4053..c9c7be6 100644 --- a/init_dir.go +++ b/init_dir.go @@ -39,7 +39,7 @@ func initDir(args *argContainer) { } password := readpassword.Twice(args.extpass) creator := tlog.ProgramName + " " + GitVersion - err = configfile.CreateConfFile(args.config, password, args.plaintextnames, args.scryptn, creator, args.reverse) + err = configfile.CreateConfFile(args.config, password, args.plaintextnames, args.scryptn, creator, args.gcmsiv) if err != nil { tlog.Fatal.Println(err) os.Exit(ERREXIT_INIT) @@ -53,8 +53,14 @@ func initDir(args *argContainer) { os.Exit(ERREXIT_INIT) } } - - tlog.Info.Printf(tlog.ColorGreen + "The filesystem has been created successfully." + tlog.ColorReset) + mountArgs := "" + fsName := "gocryptfs" + if args.reverse { + mountArgs = " -reverse" + fsName = "gocryptfs-reverse" + } + tlog.Info.Printf(tlog.ColorGreen+"The %s filesystem has been created successfully."+tlog.ColorReset, + fsName) wd, _ := os.Getwd() friendlyPath, _ := filepath.Rel(wd, args.cipherdir) if strings.HasPrefix(friendlyPath, "../") { @@ -62,7 +68,7 @@ func initDir(args *argContainer) { // keep the absolute path. friendlyPath = args.cipherdir } - tlog.Info.Printf(tlog.ColorGrey+"You can now mount it using: %s %s MOUNTPOINT"+tlog.ColorReset, - tlog.ProgramName, friendlyPath) + tlog.Info.Printf(tlog.ColorGrey+"You can now mount it using: %s%s %s MOUNTPOINT"+tlog.ColorReset, + tlog.ProgramName, mountArgs, friendlyPath) os.Exit(0) } -- cgit v1.2.3