mirror of
https://github.com/moul/sshportal.git
synced 2025-03-10 06:17:23 +08:00
Return non-null exit-code on authentication error
This commit is contained in:
parent
7b30017a14
commit
695ddc91dd
2 changed files with 3 additions and 1 deletions
|
@ -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
2
ssh.go
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue