~ubuntu-branches/ubuntu/maverick/krb5/maverick

« back to all changes in this revision

Viewing changes to src/lib/krb5/krb/ser_auth.c

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hartman
  • Date: 2009-05-07 16:16:34 UTC
  • mfrom: (13.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20090507161634-xqyk0s9na0le4flj
Tags: 1.7dfsg~beta1-4
When  decrypting the TGS response fails with the subkey, try with the
session key to work around Heimdal bug, Closes: #527353 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * lib/krb5/krb/ser_auth.c
3
3
 *
4
 
 * Copyright 1995 by the Massachusetts Institute of Technology.
 
4
 * Copyright 1995, 2008 by the Massachusetts Institute of Technology.
5
5
 * All Rights Reserved.
6
6
 *
7
7
 * Export of this software from the United States of America may
28
28
/*
29
29
 * ser_auth.c - Serialize krb5_authenticator structure.
30
30
 */
 
31
 
 
32
#ifndef LEAN_CLIENT
 
33
 
31
34
#include "k5-int.h"
32
35
#include "int-proto.h"
33
36
 
246
249
        /* Get memory for the authenticator */
247
250
        if ((remain >= (3*sizeof(krb5_int32))) &&
248
251
            (authenticator = (krb5_authenticator *) 
249
 
             malloc(sizeof(krb5_authenticator)))) {
250
 
            memset(authenticator, 0, sizeof(krb5_authenticator));
 
252
             calloc(1, sizeof(krb5_authenticator)))) {
251
253
 
252
254
            /* Get ctime */
253
255
            (void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
304
306
 
305
307
                /* Get memory for the authorization data pointers */
306
308
                if ((authenticator->authorization_data = (krb5_authdata **)
307
 
                     malloc(sizeof(krb5_authdata *) * len))) {
308
 
                    memset(authenticator->authorization_data, 0,
309
 
                           sizeof(krb5_authdata *) * len);
310
 
 
 
309
                     calloc(len, sizeof(krb5_authdata *)))) {
311
310
                    for (i=0; !kret && (i<nadata); i++) {
312
311
                        kret = krb5_internalize_opaque(kcontext,
313
312
                                                       KV5M_AUTHDATA,
339
338
    }
340
339
    return(kret);
341
340
}
342
 
 
343
341
/*
344
342
 * Register the authenticator serializer.
345
343
 */
348
346
{
349
347
    return(krb5_register_serializer(kcontext, &krb5_authenticator_ser_entry));
350
348
}
 
349
#endif