gitea源码

pam_stub.go 482B

1234567891011121314151617181920212223
  1. // Copyright 2014 The Gogs Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. //go:build !pam
  4. package pam
  5. import (
  6. "errors"
  7. )
  8. // Supported is false when built without PAM
  9. var Supported = false
  10. // Auth not supported lack of pam tag
  11. func Auth(serviceName, userName, passwd string) (string, error) {
  12. // bypass the lint on callers: SA4023: this comparison is always true (staticcheck)
  13. if !Supported {
  14. return "", errors.New("PAM not supported")
  15. }
  16. return "", nil
  17. }