From 9fffc2d6935e4c9b0adbdc3aa798ce14e6198aaa Mon Sep 17 00:00:00 2001 From: TraceEntertains <73800394+TraceEntertains@users.noreply.github.com> Date: Sat, 22 Feb 2025 17:30:48 -0500 Subject: [PATCH] Hotfix 2 (electric boogaloo), initialize server accounts (#17) --- globals/accounts.go | 7 ++++++- init.go | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/globals/accounts.go b/globals/accounts.go index 02bd2ad..e2c759b 100644 --- a/globals/accounts.go +++ b/globals/accounts.go @@ -10,6 +10,11 @@ import ( var AuthenticationServerAccount *nex.Account var SecureServerAccount *nex.Account +func InitAccounts() { + AuthenticationServerAccount = nex.NewAccount(1, "Quazal Authentication", KerberosPassword) + SecureServerAccount = nex.NewAccount(2, "Quazal Rendez-Vous", KerberosPassword) +} + func AccountDetailsByPID(pid types.PID) (*nex.Account, *nex.Error) { if pid.Equals(AuthenticationServerAccount.PID) { return AuthenticationServerAccount, nil @@ -53,4 +58,4 @@ func AccountDetailsByUsername(username string) (*nex.Account, *nex.Error) { account := nex.NewAccount(pid, username, password) return account, nil -} \ No newline at end of file +} diff --git a/init.go b/init.go index e4c0ab7..40d1710 100644 --- a/init.go +++ b/init.go @@ -53,6 +53,8 @@ func init() { globals.KerberosPassword = string(kerberosPassword) + globals.InitAccounts() + if strings.TrimSpace(authenticationServerPort) == "" { globals.Logger.Error("PN_SMM_AUTHENTICATION_SERVER_PORT environment variable not set") os.Exit(0)