[28880] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Fix loop to determine MSLSA principal name

daemon@ATHENA.MIT.EDU (Benjamin Kaduk)
Mon May 11 14:56:22 2015

Date: Mon, 11 May 2015 14:56:13 -0400
From: Benjamin Kaduk <kaduk@mit.edu>
Message-Id: <201505111856.t4BIuDXl019938@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/d7dc6c347e352324e374b3456f60e49aa4b8ba08
commit d7dc6c347e352324e374b3456f60e49aa4b8ba08
Author: Ben Kaduk <kaduk@mit.edu>
Date:   Fri Mar 6 15:42:10 2015 -0500

    Fix loop to determine MSLSA principal name
    
    When looping over principals, check the i-th entry instead of
    looking at the 0-th entry each time through the loop.  This would
    only affect cases when multiple ticket entries were returned from
    the LSA, the first one did not have a valid principal name, but
    some other one did.  It is expected that all of the returned
    ticket entries will always have a valid client principal name, so
    this is unlikely to cause any functional difference.
    
    ticket: 8177 (new)
    queue: kfw
    tags: pullup
    target_version: 1.13.3

 src/lib/krb5/ccache/cc_mslsa.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/krb5/ccache/cc_mslsa.c b/src/lib/krb5/ccache/cc_mslsa.c
index c775805..7a80470 100644
--- a/src/lib/krb5/ccache/cc_mslsa.c
+++ b/src/lib/krb5/ccache/cc_mslsa.c
@@ -1568,8 +1568,8 @@ krb5_lcc_resolve (krb5_context context, krb5_ccache *id, const char *residual)
         /* Take the first client principal we find; they should all be the
          * same anyway. */
         for (i = 0; i < pResponse->CountOfTickets; i++) {
-            if (UnicodeStringToMITPrinc(&pResponse->Tickets[0].ClientName,
-                                        &pResponse->Tickets[0].ClientRealm,
+            if (UnicodeStringToMITPrinc(&pResponse->Tickets[i].ClientName,
+                                        &pResponse->Tickets[i].ClientRealm,
                                         context, &data->princ))
                 break;
 
@@ -1915,8 +1915,8 @@ krb5_lcc_get_principal(krb5_context context, krb5_ccache id, krb5_principal *pri
             /* Take the first client principal we find; they should all be the
              * same anyway. */
             for (i = 0; i < pResponse->CountOfTickets; i++) {
-                if (UnicodeStringToMITPrinc(&pResponse->Tickets[0].ClientName,
-                                            &pResponse->Tickets[0].ClientRealm,
+                if (UnicodeStringToMITPrinc(&pResponse->Tickets[i].ClientName,
+                                            &pResponse->Tickets[i].ClientRealm,
                                             context, &data->princ))
                     break;
             }
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post