Return non-null exit-code on authentication error

This commit is contained in:
Manfred Touron 2018-01-02 23:02:18 +01:00
parent 7b30017a14
commit 695ddc91dd
2 changed files with 3 additions and 1 deletions

View file

@ -2,7 +2,7 @@
## master (unreleased)
* No entry
* Return non-null exit-code on authentication error
## v1.7.0 (2018-01-02)

2
ssh.go
View file

@ -195,6 +195,7 @@ func shellHandler(s ssh.Session) {
if actx.err != nil {
fmt.Fprintf(s, "error: %v\n", actx.err)
_ = s.Exit(1)
return
}
@ -209,6 +210,7 @@ func shellHandler(s ssh.Session) {
case UserTypeShell:
if err := shell(s); err != nil {
fmt.Fprintf(s, "error: %v\n", err)
_ = s.Exit(1)
}
return
case UserTypeInvite: