aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-12-10 12:49:43 +0100
committerJakob Unterwurzacher2016-12-10 12:49:43 +0100
commit21904cd5f03f853ea6ceccbb414a5070c1f96324 (patch)
tree09d242233e1e95ccda2d624595056e9c6b31c16f
parent3e5904114795ddb6863c6c46f366ac36c83d1c04 (diff)
ctlsock: exit if socket cannot be created
-rw-r--r--mount.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/mount.go b/mount.go
index 29d34b8..b9bdc40 100644
--- a/mount.go
+++ b/mount.go
@@ -178,7 +178,13 @@ func initFuseFrontend(key []byte, args *argContainer, confFile *configfile.ConfF
ctlSockBackend = fs
}
if args.ctlsock != "" {
- ctlsock.CreateAndServe(args.ctlsock, ctlSockBackend)
+ err := ctlsock.CreateAndServe(args.ctlsock, ctlSockBackend)
+ if err != nil {
+ // TODO if the socket cannot be created, we should exit BEFORE
+ // asking the user for the password
+ tlog.Fatal.Printf("ctlsock: %v", err)
+ os.Exit(ErrExitMount)
+ }
}
pathFsOpts := &pathfs.PathNodeFsOptions{ClientInodes: true}
pathFs := pathfs.NewPathNodeFs(finalFs, pathFsOpts)