Fix the forced setting of the Initial Ticket Flag on Win2000 and
authorJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 8 Oct 2004 03:57:45 +0000 (03:57 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 8 Oct 2004 03:57:45 +0000 (03:57 +0000)
add the functionality to XP and 2003 SP1.

ticket: 2735

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

src/lib/krb5/ccache/ChangeLog
src/lib/krb5/ccache/cc_mslsa.c

index 11ac8d80fd8a9d380faa9d138e9497d6a0157aea..757ce389c682f8df1d00c35c2c8a2e94dff029d1 100644 (file)
@@ -1,3 +1,7 @@
+2004-10-07  Jeffrey Altman <jaltman@mit.edu>
+        * cc_mslsa.c: Fix the forced setting of the Initial Ticket Flag
+                on Win2000 and add it to XP and 2003 SP1
+
 2004-09-17  Jeffrey Altman <jaltman@mit.edu>
         * cc_mslsa.c: Fix the error returned when krb5_lcc_start_seq_get()
           discovers the cache is empty.  Check for the new error in 
index f35a594991539561f4eea8882c94d7840b3ea639..c12f5817e81035387ecd760a8008e29061b97e02 100644 (file)
@@ -1621,7 +1621,7 @@ GetMSCacheTicketFromCacheInfoW2K( HANDLE LogonHandle, ULONG PackageId,
      * to us.
      */
     if ( tktinfo->TicketFlags & KERB_TICKET_FLAGS_initial )
-        (*ticket)->TicketFlags &= KERB_TICKET_FLAGS_initial;
+        (*ticket)->TicketFlags |= KERB_TICKET_FLAGS_initial;
     return(TRUE);
 
 }
@@ -1679,6 +1679,14 @@ GetMSCacheTicketFromCacheInfoXP( HANDLE LogonHandle, ULONG PackageId,
     
     /* otherwise return ticket */
     *ticket = &(pTicketResponse->Ticket);
+
+    /* set the initial flag if we were attempting to retrieve one
+     * because Windows won't necessarily return the initial ticket
+     * to us.
+     */
+    if ( tktinfo->TicketFlags & KERB_TICKET_FLAGS_initial )
+        (*ticket)->TicketFlags |= KERB_TICKET_FLAGS_initial;
+
     return(TRUE);
 
 }
@@ -1737,6 +1745,14 @@ GetMSCacheTicketFromCacheInfoEX2( HANDLE LogonHandle, ULONG PackageId,
     
     /* otherwise return ticket */
     *ticket = &(pTicketResponse->Ticket);
+    
+    /* set the initial flag if we were attempting to retrieve one
+     * because Windows won't necessarily return the initial ticket
+     * to us.
+     */
+    if ( tktinfo->TicketFlags & KERB_TICKET_FLAGS_initial )
+        (*ticket)->TicketFlags |= KERB_TICKET_FLAGS_initial;
+
     return(TRUE);
 }
 #endif /* HAVE_CACHE_INFO_EX2 */