diff --git a/lib/srv/usermgmt.go b/lib/srv/usermgmt.go index d8ce41205908f..5dd3558810ec0 100644 --- a/lib/srv/usermgmt.go +++ b/lib/srv/usermgmt.go @@ -319,7 +319,9 @@ func (u *HostUserManagement) UpsertUser(name string, ui *services.HostUsersInfo) var home string if ui.Mode != types.CreateHostUserMode_HOST_USER_MODE_INSECURE_DROP { + //nolint:staticcheck // SA4023. False positive on macOS. home, err = readDefaultHome(name) + //nolint:staticcheck // SA4023. False positive on macOS. if err != nil { return nil, trace.Wrap(err) } diff --git a/lib/srv/usermgmt_other.go b/lib/srv/usermgmt_other.go index b2615b821388b..66bb293a75ae5 100644 --- a/lib/srv/usermgmt_other.go +++ b/lib/srv/usermgmt_other.go @@ -35,6 +35,7 @@ func newHostSudoersBackend(_ string) (HostSudoersBackend, error) { return nil, trace.NotImplemented("Host user creation management is only supported on linux") } +//nolint:staticcheck // intended to always return an error for non-linux builds func readDefaultHome(user string) (string, error) { return "", trace.NotImplemented("readDefaultHome is only supported on linux") }