From: Jeffrey Altman Date: Fri, 8 Oct 2004 03:57:45 +0000 (+0000) Subject: Fix the forced setting of the Initial Ticket Flag on Win2000 and X-Git-Tag: krb5-1.4-beta1~27 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a2374cc7e141f02fd00d9634d26c16ba9f2ac7f3;p=thirdparty%2Fkrb5.git Fix the forced setting of the Initial Ticket Flag on Win2000 and 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 --- diff --git a/src/lib/krb5/ccache/ChangeLog b/src/lib/krb5/ccache/ChangeLog index 11ac8d80fd..757ce389c6 100644 --- a/src/lib/krb5/ccache/ChangeLog +++ b/src/lib/krb5/ccache/ChangeLog @@ -1,3 +1,7 @@ +2004-10-07 Jeffrey Altman + * 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 * cc_mslsa.c: Fix the error returned when krb5_lcc_start_seq_get() discovers the cache is empty. Check for the new error in diff --git a/src/lib/krb5/ccache/cc_mslsa.c b/src/lib/krb5/ccache/cc_mslsa.c index f35a594991..c12f5817e8 100644 --- a/src/lib/krb5/ccache/cc_mslsa.c +++ b/src/lib/krb5/ccache/cc_mslsa.c @@ -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 */