fix pam authorization (#19040)

https://huntr.dev/bounties/8d221f92-b2b1-4878-bc31-66ff272e5ceb/

Co-authored-by: ysf <34326+ysf@users.noreply.github.com>
tokarchuk/v1.17
zeripath 3 years ago committed by GitHub
parent 7443213707
commit 1314f38b59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      modules/auth/pam/pam.go

@ -34,6 +34,10 @@ func Auth(serviceName, userName, passwd string) (string, error) {
if err = t.Authenticate(0); err != nil { if err = t.Authenticate(0); err != nil {
return "", err return "", err
} }
if err = t.AcctMgmt(0); err != nil {
return "", err
}
// PAM login names might suffer transformations in the PAM stack. // PAM login names might suffer transformations in the PAM stack.
// We should take whatever the PAM stack returns for it. // We should take whatever the PAM stack returns for it.

Loading…
Cancel
Save