diff options
author | Jakob Unterwurzacher | 2016-06-16 23:23:09 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2016-06-16 23:23:09 +0200 |
commit | cc2a75b05029453192cbf90687ce5af5016841ad (patch) | |
tree | 4389f5e3d0d63b389f107c1ba8844145d0edc44e /main.go | |
parent | 3234b9b5cee8de995dcf42b5384b9290d906397f (diff) |
Mount v0.6 and older filesystems as read-only
This is part of the phase-out of very old filesystems.
See https://github.com/rfjakob/gocryptfs/wiki/Compatibility for
more info.
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -122,8 +122,11 @@ func loadConfig(args *argContainer) (masterkey []byte, confFile *configfile.Conf pw := readpassword.Once(args.extpass) tlog.Info.Println("Decrypting master key") masterkey, confFile, err = configfile.LoadConfFile(args.config, pw) - if err != nil { - tlog.Fatal.Println(err.Error()) + if _, ok := err.(configfile.DeprecatedFsError); ok { + // Force read-only mode + args.ro = true + } else if err != nil { + tlog.Fatal.Println(err) os.Exit(ERREXIT_LOADCONF) } |