Hotfix 2 (electric boogaloo), initialize server accounts (#17)

This commit is contained in:
TraceEntertains
2025-02-22 17:30:48 -05:00
committed by GitHub
parent db650dad82
commit 9fffc2d693
2 changed files with 8 additions and 1 deletions

View File

@@ -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
}
}

View File

@@ -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)