]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
aklog: double get_credv5 in retry logic
authorMichael Meffie <mmeffie@sinenomine.net>
Fri, 9 May 2014 15:43:35 +0000 (11:43 -0400)
committerStephan Wiesand <stephan.wiesand@desy.de>
Thu, 26 Jun 2014 09:52:03 +0000 (05:52 -0400)
Fix a bug where get_credv5() is called twice, even if the first one
succeeded, in the aklog retry logic.

(This bug uncovers another bug where get_credv5_akimpersonate
crashes in the krb5 libs when get_credv5 is called back to back.)

Reviewed-on: http://gerrit.openafs.org/11133
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit b9979e1a23ce28b20fe95d5e6042b9b15506c993)

Change-Id: I53b274f5e417ebd2a88b18df15ceb0e1ea39624d
Reviewed-on: http://gerrit.openafs.org/11218
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/aklog/aklog.c

index deb2a42e5d78aa4652e50e27fd9c568c5f0fb8cc..7782b0c9c0630a2f1ce7e7a999c66f94f9fcffba 100644 (file)
@@ -538,9 +538,9 @@ rxkad_get_ticket(krb5_context context, char *realm,
                    }
                    afs_dprintf("We've deduced that we need to authenticate"
                            " to realm %s.\n", realm_of_cell);
+                   status = get_credv5(context, AFSKEY, cell->name,
+                                       realm_of_cell, v5cred);
                }
-               status = get_credv5(context, AFSKEY, cell->name,
-                                   realm_of_cell, v5cred);
            }
 
            /* If the realm and cell name match, then try without an