]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
KRB5KRB_AP_ERR_BADADDR-retry-20040510
authorJeffrey Altman <jaltman@mit.edu>
Tue, 11 May 2004 03:45:20 +0000 (03:45 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 11 May 2004 03:45:20 +0000 (03:45 +0000)
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.

src/WINNT/aklog/aklog.c

index 0a46960b7430aeb33c35706a31b8e5be7743a00b..00a5cdb3a3ddf9eae98ffacbd47cbf6d257374b0 100644 (file)
@@ -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 
        {