krb5 commit: Fix uninitialized flags in MSLSA ccache type

Greg Hudson <[email protected]>
Newsgroups gmane.comp.encryption.kerberos.cvs
Message-ID <[email protected]>
https://github.com/krb5/krb5/commit/e5a78d4c90d9d6968c94b0c07f2cd3835f02aa5d
commit e5a78d4c90d9d6968c94b0c07f2cd3835f02aa5d
Author: Alexander Karaivanov <[email protected]>
Date:   Mon Apr 24 09:01:12 2017 +0200

    Fix uninitialized flags in MSLSA ccache type
    
    The flags field in krb5_lcc_data is not initialized in
    krb5_lcc_resolve(), so krb5_lcc_next_cred() can sometimes fail to
    include a ticket when retrieving a ccache entry.  This results in a
    "Request did not supply a ticket" error from k5_make_tgs_req() when
    trying to use the credential.
    
    [[email protected]: condensed commit message]
    
    ticket: 8567
    target_version: 1.13-next
    target_version: 1.14-next
    target_version: 1.15-next
    tags: pullup

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

diff --git a/src/lib/krb5/ccache/cc_mslsa.c b/src/lib/krb5/ccache/cc_mslsa.c
index 7a80470..c741a50 100644
--- a/src/lib/krb5/ccache/cc_mslsa.c
+++ b/src/lib/krb5/ccache/cc_mslsa.c
@@ -1553,6 +1553,7 @@ krb5_lcc_resolve (krb5_context context, krb5_ccache *id, const char *residual)
     data->LogonHandle = LogonHandle;
     data->PackageId = PackageId;
     data->princ = NULL;
+    data->flags = 0;
 
     data->cc_name = (char *)malloc(strlen(residual)+1);
     if (data->cc_name == NULL) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.