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

« back to all changes in this revision

Viewing changes to src/plugins/kdb/ldap/libkdb_ldap/ldap_fetch_mkey.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:
47
47
    /* Clear the global error string */
48
48
    krb5_clear_error_message(context);
49
49
 
50
 
    dal_handle = (kdb5_dal_handle *) context->db_context;
 
50
    dal_handle = context->dal_handle;
51
51
    ldap_context = (krb5_ldap_context *) dal_handle->db_context;
52
52
 
53
53
    if (ldap_context == NULL || ldap_context->lrparams == NULL)
75
75
    /* Clear the global error string */
76
76
    krb5_clear_error_message(context);
77
77
 
78
 
    dal_handle = (kdb5_dal_handle *) context->db_context;
 
78
    dal_handle = context->dal_handle;
79
79
    ldap_context = (krb5_ldap_context *) dal_handle->db_context;
80
80
 
81
81
    if (ldap_context == NULL || ldap_context->lrparams == NULL)
98
98
    memcpy(r_params->mkey.contents, key->contents, key->length);
99
99
    return 0;
100
100
}
 
101
 
 
102
krb5_error_code
 
103
krb5_ldap_get_mkey_list (krb5_context context, krb5_keylist_node **key_list)
 
104
 
 
105
{
 
106
    kdb5_dal_handle             *dal_handle=NULL;
 
107
    krb5_ldap_context           *ldap_context=NULL;
 
108
 
 
109
    /* Clear the global error string */
 
110
    krb5_clear_error_message(context);
 
111
 
 
112
    dal_handle = context->dal_handle;
 
113
    ldap_context = (krb5_ldap_context *) dal_handle->db_context;
 
114
 
 
115
    if (ldap_context == NULL || ldap_context->lrparams == NULL)
 
116
        return KRB5_KDB_DBNOTINITED;
 
117
 
 
118
    *key_list = ldap_context->lrparams->mkey_list;
 
119
    return 0;
 
120
}
 
121
 
 
122
krb5_error_code
 
123
krb5_ldap_set_mkey_list(krb5_context context, krb5_keylist_node *key_list)
 
124
{
 
125
    kdb5_dal_handle             *dal_handle=NULL;
 
126
    krb5_ldap_context           *ldap_context=NULL;
 
127
    krb5_ldap_realm_params      *r_params = NULL;
 
128
 
 
129
    /* Clear the global error string */
 
130
    krb5_clear_error_message(context);
 
131
 
 
132
    dal_handle = context->dal_handle;
 
133
    ldap_context = (krb5_ldap_context *) dal_handle->db_context;
 
134
 
 
135
    if (ldap_context == NULL || ldap_context->lrparams == NULL)
 
136
        return KRB5_KDB_DBNOTINITED;
 
137
 
 
138
    r_params = ldap_context->lrparams;
 
139
    r_params->mkey_list = key_list;
 
140
    return 0;
 
141
}
 
142