Skip to content

Commit

Permalink
pam: validate the user's account as part of the authentication flow
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammed90 committed Sep 22, 2022
1 parent 2431382 commit 4b3e639
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/authentication/os/pam.go
Expand Up @@ -62,6 +62,11 @@ func (pm OS) AuthenticateUser(sshctx session.ConnMetadata, password []byte) (aut
pm.logger.Warn("error Authenticate", zap.Error(err))
return nil, false, err
}
err = t.AcctMgmt(0)
if err != nil {
pm.logger.Warn("error Authenticate", zap.Error(err))
return nil, false, err
}
u, err := user.Lookup(sshctx.User())
if err != nil {
return nil, false, err
Expand Down

0 comments on commit 4b3e639

Please sign in to comment.