From dbaa8b5b62b44bd197b7ba67a0c6ab4f5123a41a Mon Sep 17 00:00:00 2001 From: Russ Magee Date: Sat, 30 Mar 2024 00:48:46 -0700 Subject: [PATCH] Ensure auth fails if server is somehow built for unsupported platform --- auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth.go b/auth.go index ebca33e..cc3b042 100755 --- a/auth.go +++ b/auth.go @@ -53,7 +53,7 @@ func VerifyPass(ctx *AuthCtx, user, password string) (bool, error) { } else if runtime.GOOS == "freebsd" { pwFileName = "/etc/master.passwd" } else { - pwFileName = "unsupported" + return false, errors.New("Unsupported platform") } pwFileData, e := ctx.reader(pwFileName) if e != nil {