diff options
author | ysf <34326+ysf@users.noreply.github.com> | 2022-03-08 13:02:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-08 20:02:01 +0800 |
commit | 940a7da9d162d1363b7ca5d050f86556cd5762a0 (patch) | |
tree | f6b2ccb79894465ce62c0b9efa90d4881a20ba0c /internal | |
parent | 242deca524dbf922bfb08dadd65455164b9e663e (diff) |
security: fix improper PAM authorization handling (#6819)
Co-authored-by: Joe Chen <jc@unknwon.io>
Diffstat (limited to 'internal')
-rw-r--r-- | internal/auth/pam/pam.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/internal/auth/pam/pam.go b/internal/auth/pam/pam.go index 0777bf7c..cbd3500d 100644 --- a/internal/auth/pam/pam.go +++ b/internal/auth/pam/pam.go @@ -25,6 +25,10 @@ func (c *Config) doAuth(login, password string) error { if err != nil { return err } - - return t.Authenticate(0) + + err = t.Authenticate(0) + if err != nil { + return err + } + return t.AcctMgmt(0) } |