apply patch from jaltman:
authorTom Yu <tlyu@mit.edu>
Tue, 24 Jun 2003 02:29:47 +0000 (02:29 +0000)
committerTom Yu <tlyu@mit.edu>
Tue, 24 Jun 2003 02:29:47 +0000 (02:29 +0000)
* ms2mit.c: Windows Credentials are addressless. Do not store the
credentials in the MIT cache with addresses since they do not
contain addresses in the encrypted portion of the credential.
Instead generate a valid empty address list.

ticket: 1618
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15648 dc483132-0cff-0310-8789-dd5450dbe970

src/windows/ms2mit/ChangeLog
src/windows/ms2mit/ms2mit.c

index b68c646d3358195929f2908476e6c87d2ce95195..8741abbc05e09b2859ef67b14128dcc86aec8d03 100644 (file)
@@ -1,3 +1,10 @@
+2003-06-20  Jeffrey Altman <jaltman@mit.edu>
+
+       * ms2mit.c: Windows Credentials are addressless. Do not store the
+       credentials in the MIT cache with addresses since they do not
+       contain addresses in the encrypted portion of the credential.
+       Instead generate a valid empty address list.
+
 2002-08-29  Ken Raeburn  <raeburn@mit.edu>
 
        * Makefile.in: Revert $(S)=>/ change, for Windows support.
index 4ec6941ad96b638b507ef7d4ca39fd6362320519..c2d1d384ec2a7e774fbbb0acde80d82462c1144a 100644 (file)
@@ -264,11 +264,11 @@ MSCredToMITCred(
     creds->times.endtime=FileTimeToUnixTime(&msticket->EndTime);
     creds->times.renew_till=FileTimeToUnixTime(&msticket->RenewUntil);
 
-    // krb5_cc_store_cred crashes downstream if creds->addresses is NULL.
-    // unfortunately, the MS interface doesn't seem to return a list of
-    // addresses as part of the credentials information. for now i'll just
-    // use krb5_os_localaddr to mock up the address list. is this sufficient?
-    krb5_os_localaddr(context, &creds->addresses);
+    /* MS Tickets are addressless.  MIT requires an empty address
+     * not a NULL list of addresses.
+     */
+    creds->addresses = (krb5_address **)malloc(sizeof(krb5_address *));
+    memset(creds->addresses, 0, sizeof(krb5_address *));
 
     MSTicketToMITTicket(msticket, context, &creds->ticket);
 }