aboutsummaryrefslogtreecommitdiffstats
path: root/modules/auth/pam/pam_stub.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/auth/pam/pam_stub.go')
-rw-r--r--modules/auth/pam/pam_stub.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/auth/pam/pam_stub.go b/modules/auth/pam/pam_stub.go
index a48e89860e..3631eeeda7 100644
--- a/modules/auth/pam/pam_stub.go
+++ b/modules/auth/pam/pam_stub.go
@@ -14,5 +14,9 @@ var Supported = false
// Auth not supported lack of pam tag
func Auth(serviceName, userName, passwd string) (string, error) {
- return "", errors.New("PAM not supported")
+ // bypass the lint on callers: SA4023: this comparison is always true (staticcheck)
+ if !Supported {
+ return "", errors.New("PAM not supported")
+ }
+ return "", nil
}