aboutsummaryrefslogtreecommitdiff
path: root/internal/configfile
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-02-26 19:25:23 +0100
committerJakob Unterwurzacher2017-02-26 19:25:23 +0100
commit427c6c17193eda7fec77490175fbf7d8c86c3481 (patch)
treee8cca03fa6f28518d462dff785823d3141e66b14 /internal/configfile
parent57612a278bdd26de611b543be311748ca4dc42ca (diff)
exitcodes: define code 12 for "password incorrect"
Diffstat (limited to 'internal/configfile')
-rw-r--r--internal/configfile/config_file.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/configfile/config_file.go b/internal/configfile/config_file.go
index c4865d7..1233d8a 100644
--- a/internal/configfile/config_file.go
+++ b/internal/configfile/config_file.go
@@ -9,6 +9,7 @@ import (
"github.com/rfjakob/gocryptfs/internal/contentenc"
"github.com/rfjakob/gocryptfs/internal/cryptocore"
+ "github.com/rfjakob/gocryptfs/internal/exitcodes"
"github.com/rfjakob/gocryptfs/internal/tlog"
)
import "os"
@@ -163,7 +164,7 @@ func LoadConfFile(filename string, password string) ([]byte, *ConfFile, error) {
tlog.Warn.Enabled = true
if err != nil {
tlog.Warn.Printf("failed to unlock master key: %s", err.Error())
- return nil, nil, fmt.Errorf("Password incorrect.")
+ return nil, nil, exitcodes.NewErr("Password incorrect.", exitcodes.PasswordIncorrect)
}
return key, &cf, err