From: Jeffrey Altman Date: Tue, 11 May 2004 03:45:20 +0000 (+0000) Subject: KRB5KRB_AP_ERR_BADADDR-retry-20040510 X-Git-Tag: openafs-devel-1_3_64~7 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=265c009c72e7a7cbb29421c06f13fc97179e287a;p=packages%2Fo%2Fopenafs.git KRB5KRB_AP_ERR_BADADDR-retry-20040510 retry once if KRB5KRB_AP_ERR_BADADDR error is received while attempting to obtain tickets. This is often produced when using transitive trusts. a retry is then successful. --- diff --git a/src/WINNT/aklog/aklog.c b/src/WINNT/aklog/aklog.c index 0a46960b7..00a5cdb3a 100644 --- a/src/WINNT/aklog/aklog.c +++ b/src/WINNT/aklog/aklog.c @@ -526,6 +526,9 @@ static int auth_to_cell(krb5_context context, char *cell, char *realm) if (usev5) { /* using krb5 */ + int retry = 1; + + try_v5: if (dflag) printf("Getting v5 tickets: %s/%s@%s\n", name, instance, realm_of_cell); status = get_v5cred(context, name, instance, realm_of_cell, NULL, &v5cred); @@ -534,6 +537,10 @@ static int auth_to_cell(krb5_context context, char *cell, char *realm) printf("Getting v5 tickets: %s@%s\n", name, realm_of_cell); status = get_v5cred(context, name, "", realm_of_cell, NULL, &v5cred); } + if ( status == KRB5KRB_AP_ERR_MSG_TYPE && retry ) { + retry = 0; + goto try_v5; + } } else {