diff options
author | zeripath | 2022-03-10 02:00:05 +0000 |
---|---|---|
committer | GitHub | 2022-03-10 10:00:05 +0800 |
commit | 1314f38b59748397b3429fb9bc9f9d6bac85d2f2 (patch) | |
tree | fd9f22cbc7b2364947758ead669a82d068e17b13 | |
parent | 7443213707bde01ee8343d49b26824dc50e1ac18 (diff) |
fix pam authorization (#19040)
https://huntr.dev/bounties/8d221f92-b2b1-4878-bc31-66ff272e5ceb/
Co-authored-by: ysf <34326+ysf@users.noreply.github.com>
-rw-r--r-- | modules/auth/pam/pam.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/auth/pam/pam.go b/modules/auth/pam/pam.go index 30f13e440..0a3d8e9f9 100644 --- a/modules/auth/pam/pam.go +++ b/modules/auth/pam/pam.go @@ -34,6 +34,10 @@ func Auth(serviceName, userName, passwd string) (string, error) { if err = t.Authenticate(0); err != nil { return "", err } + + if err = t.AcctMgmt(0); err != nil { + return "", err + } // PAM login names might suffer transformations in the PAM stack. // We should take whatever the PAM stack returns for it. |