Index: arlad/fcache.c =================================================================== RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/arlad/fcache.c,v retrieving revision 1.402 diff -u -r1.402 fcache.c --- arlad/fcache.c 2002/10/24 13:02:36 1.402 +++ arlad/fcache.c 2002/11/05 15:26:07 @@ -1384,6 +1384,33 @@ return context->ve->entry.serverPartition[i]; } +static int +try_again_less_auth (int *ret, CredCacheEntry **ce) +{ + switch (*ret) { +#ifdef KERBEROS + case RXKADEXPIRED : + case RXKADUNKNOWNKEY: { + int32_t cell = (*ce)->cell; + + /* Want to do conn_clearcred with pag but have no pag */ + conn_clearcred (CONN_CS_CELL|CONN_CS_SECIDX, cell, -1, 2); + cred_expire (*ce); + cred_free (*ce); + /* Want to do cred_get with pag but have no pag */ + *ce = cred_get (cell, 0, CRED_ANY); + assert (*ce != NULL); + return TRUE; + } + case RXKADSEALEDINCON : + arla_warnx (ADEBWARN, "seal error"); + *ret = EINVAL; + return FALSE; +#endif + default : + return FALSE; + } +} /* * Find the next fileserver for the request in `context'. * Returns a ConnCacheEntry or NULL. @@ -1456,7 +1483,10 @@ ve = e->volume; } - ret = volume_make_uptodate (ve, ce); + do { + ret = volume_make_uptodate (ve, ce); + } while (try_again_less_auth(&ret, &ce)); + if (ret) return NULL;