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

« back to all changes in this revision

Viewing changes to src/lib/krb5/asn.1/asn1_misc.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
/* -*- mode: c; indent-tabs-mode: nil -*- */
1
2
/*
2
3
 * src/lib/krb5/asn.1/asn1_misc.c
3
 
 * 
 
4
 *
4
5
 * Copyright 1994 by the Massachusetts Institute of Technology.
5
6
 * All Rights Reserved.
6
7
 *
8
9
 *   require a specific license from the United States Government.
9
10
 *   It is the responsibility of any person or organization contemplating
10
11
 *   export to obtain such a license before exporting.
11
 
 * 
 
12
 *
12
13
 * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
13
14
 * distribute this software and its documentation for any purpose and
14
15
 * without fee is hereby granted, provided that the above copyright
28
29
 
29
30
asn1_error_code asn1_krb5_realm_copy(krb5_principal target, krb5_principal source)
30
31
{
31
 
  target->realm.length = source->realm.length;
32
 
  target->realm.data = (char*)malloc(target->realm.length); /* copy realm */
33
 
  if (target->realm.data == NULL) return ENOMEM;
34
 
  memcpy(target->realm.data,source->realm.data, /* to client */
35
 
         target->realm.length);
36
 
  return 0;
 
32
    target->realm.length = source->realm.length;
 
33
    target->realm.data = (char*)malloc(target->realm.length); /* copy realm */
 
34
    if (target->realm.data == NULL) return ENOMEM;
 
35
    memcpy(target->realm.data,source->realm.data, /* to client */
 
36
           target->realm.length);
 
37
    return 0;
37
38
}