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)