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

« back to all changes in this revision

Viewing changes to src/plugins/kdb/db2/kdb_xdr.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:
65
65
    int                   i, j;
66
66
    unsigned int          unparse_princ_size;
67
67
    char                * unparse_princ;
68
 
    char                * nextloc;
 
68
    unsigned char       * nextloc;
69
69
    krb5_tl_data        * tl_data;
70
70
    krb5_error_code       retval;
71
71
    krb5_int16            psize16;
128
128
     * Now we go through entry again, this time copying data 
129
129
     * These first entries are always saved regardless of version
130
130
     */
131
 
    nextloc = content->data;
 
131
    nextloc = (unsigned char *)content->data;
132
132
 
133
133
        /* Base Length */
134
134
    krb5_kdb_encode_int16(entry->len, nextloc);
250
250
    krb5_db_entry       * entry;
251
251
{
252
252
    int                   sizeleft, i;
253
 
    char                * nextloc;
 
253
    unsigned char       * nextloc;
254
254
    krb5_tl_data       ** tl_data;
255
255
    krb5_int16            i16;
256
256
 
269
269
     */
270
270
 
271
271
    /* First do the easy stuff */
272
 
    nextloc = content->data;
 
272
    nextloc = (unsigned char *)content->data;
273
273
    sizeleft = content->length;
274
274
    if ((sizeleft -= KRB5_KDB_V1_BASE_LENGTH) < 0) 
275
275
        return KRB5_KDB_TRUNCATED_RECORD;
349
349
    i = (int) i16;
350
350
    nextloc += 2;
351
351
 
352
 
    if ((retval = krb5_parse_name(context, nextloc, &(entry->princ))))
 
352
    if ((retval = krb5_parse_name(context, (char *)nextloc, &(entry->princ))))
353
353
        goto error_out;
354
 
    if (((size_t) i != (strlen(nextloc) + 1)) || (sizeleft < i)) {
 
354
    if (((size_t) i != (strlen((char *)nextloc) + 1)) || (sizeleft < i)) {
355
355
        retval = KRB5_KDB_TRUNCATED_RECORD;
356
356
        goto error_out;
357
357
    }