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

« back to all changes in this revision

Viewing changes to src/lib/gssapi/generic/rel_oid_set.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
/* #ident  "@(#)gss_release_oid_set.c 1.12     95/08/23 SMI" */
2
3
 
3
4
/*
4
5
 * Copyright 1996 by Sun Microsystems, Inc.
5
 
 * 
 
6
 *
6
7
 * Permission to use, copy, modify, distribute, and sell this software
7
8
 * and its documentation for any purpose is hereby granted without fee,
8
9
 * provided that the above copyright notice appears in all copies and
12
13
 * without specific, written prior permission. Sun Microsystems makes no
13
14
 * representations about the suitability of this software for any
14
15
 * purpose.  It is provided "as is" without express or implied warranty.
15
 
 * 
 
16
 *
16
17
 * SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17
18
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18
19
 * EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
34
35
#endif
35
36
 
36
37
OM_uint32
37
 
generic_gss_release_oid_set (minor_status,
38
 
                             set)
39
 
     OM_uint32 *                minor_status;
40
 
     gss_OID_set *              set;
 
38
generic_gss_release_oid_set(
 
39
    OM_uint32 *minor_status,
 
40
    gss_OID_set *set)
41
41
{
42
42
    size_t i;
43
43
    if (minor_status)
44
 
        *minor_status = 0;
 
44
        *minor_status = 0;
45
45
 
46
46
    if (set == NULL)
47
 
        return(GSS_S_COMPLETE);
 
47
        return(GSS_S_COMPLETE);
48
48
 
49
49
    if (*set == GSS_C_NULL_OID_SET)
50
 
        return(GSS_S_COMPLETE);
 
50
        return(GSS_S_COMPLETE);
51
51
 
52
52
    for (i=0; i<(*set)->count; i++)
53
 
        free((*set)->elements[i].elements);
 
53
        free((*set)->elements[i].elements);
54
54
 
55
55
    free((*set)->elements);
56
56
    free(*set);
57
57
 
58
58
    *set = GSS_C_NULL_OID_SET;
59
 
    
 
59
 
60
60
    return(GSS_S_COMPLETE);
61
61
}