448
448
if ((clen = strlen(tcell))) {
449
449
#if defined(AFS_ATHENA_STDENV) || defined(AFS_KERBREALM_ENV)
450
static char local_realm[AFS_REALM_SZ] = "";
451
if (!local_realm[0]) {
452
if (afs_krb_get_lrealm(local_realm, 0) != 0 /*KSUCCESS*/)
453
strncpy(local_realm, "UNKNOWN.LOCAL.REALM", AFS_REALM_SZ);
450
static char local_realms[AFS_NUM_LREALMS][AFS_REALM_SZ];
451
static int num_lrealms = -1;
454
if (num_lrealms == -1) {
455
for (i=0; i<AFS_NUM_LREALMS; i++) {
456
if (afs_krb_get_lrealm(local_realms[i], i) != 0 /*KSUCCESS*/)
461
strncpy(local_realms[0], "UNKNOWN.LOCAL.REALM", AFS_REALM_SZ);
455
if (strcasecmp(local_realm, tcell)) {
465
/* Check to see if the ticket cell matches one of the local realms */
467
for ( i=0;i<num_lrealms;i++ ) {
468
if (!strcasecmp(local_realms[i], tcell)) {
473
/* If yes, then make sure that the name is not present in
474
* an exclusion list */
478
snprintf(uname,sizeof(uname),"%s.%s@%s",name,inst,tcell);
480
snprintf(uname,sizeof(uname),"%s@%s",name,tcell);
482
if (afs_krb_exclusion(uname))
456
487
if (strlen(vname) + 1 + clen >= sizeof(vname))
458
489
strcat(vname, "@");