summaryrefslogtreecommitdiff
path: root/mount.go
diff options
context:
space:
mode:
Diffstat (limited to 'mount.go')
-rw-r--r--mount.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/mount.go b/mount.go
index 21a70af..96ff7f6 100644
--- a/mount.go
+++ b/mount.go
@@ -98,9 +98,14 @@ func doMount(args *argContainer) {
{
// Get master key (may prompt for the password)
var masterkey []byte
+ masterkeyFromStdin := false
+ if args.masterkey == "stdin" {
+ args.masterkey = string(readpassword.Once("", "Masterkey"))
+ masterkeyFromStdin = true
+ }
if args.masterkey != "" {
// "-masterkey"
- masterkey = parseMasterKey(args.masterkey)
+ masterkey = parseMasterKey(args.masterkey, masterkeyFromStdin)
} else if args.zerokey {
// "-zerokey"
tlog.Info.Printf("Using all-zero dummy master key.")
@@ -354,7 +359,7 @@ func initFuseFrontend(masterkey []byte, args *argContainer, confFile *configfile
}
srv, err := fuse.NewServer(conn.RawFS(), args.mountpoint, &mOpts)
if err != nil {
- tlog.Fatal.Printf("fuse.NewServer failed: %v", err)
+ tlog.Fatal.Printf("fuse.NewServer failed: %q", err)
if runtime.GOOS == "darwin" {
tlog.Info.Printf("Maybe you should run: /Library/Filesystems/osxfuse.fs/Contents/Resources/load_osxfuse")
}