From d85ece0977e043154b7d8f5aef5f4cd972771e8e Mon Sep 17 00:00:00 2001 From: Michael Meffie Date: Tue, 28 Feb 2012 09:19:11 -0500 Subject: [PATCH] auth: remove static local realms Remove the static list of local realms and use the auth interface to perform the local realm match check. Change-Id: I0f56e7974e59035eb9bf9fb343b550ab6b7ef314 Reviewed-on: http://gerrit.openafs.org/6876 Reviewed-by: Derrick Brashear Tested-by: BuildBot --- src/auth/userok.c | 53 ++++++----------------------------------------------- 1 file changed, 6 insertions(+), 47 deletions(-) diff --git a/src/auth/userok.c b/src/auth/userok.c index 1e6f856..29178c3 100644 --- a/src/auth/userok.c +++ b/src/auth/userok.c @@ -591,10 +591,8 @@ kerberosSuperUser(struct afsconf_dir *adir, char *tname, char *tinst, { char tcell_l[MAXKTCREALMLEN] = ""; char *tmp; - static char lcell[MAXCELLCHARS] = ""; - static char lrealms[AFS_NUM_LREALMS][AFS_REALM_SZ]; - static int num_lrealms = -1; - int lrealm_match = 0, i; + int code; + afs_int32 islocal; int flag; /* generate lowercased version of cell name */ @@ -607,48 +605,9 @@ kerberosSuperUser(struct afsconf_dir *adir, char *tname, char *tinst, } } - /* determine local cell name. It's static, so will only get - * calculated the first time through */ - if (!lcell[0]) - afsconf_GetLocalCell(adir, lcell, sizeof(lcell)); - - /* if running a krb environment, also get the local realm */ - /* note - this assumes AFS_REALM_SZ <= MAXCELLCHARS */ - /* just set it to lcell if it fails */ - if (num_lrealms == -1) { - for (i=0; i