kdc: base _kdc_fast_mk_error() on krb5_mk_error_ext()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:

committed by
Andrew Bartlett

parent
25f3db919f
commit
a873e21d7c
44
kdc/fast.c
44
kdc/fast.c
@@ -244,8 +244,9 @@ _kdc_fast_mk_error(krb5_context context,
|
|||||||
const KDC_REQ_BODY *req_body,
|
const KDC_REQ_BODY *req_body,
|
||||||
krb5_error_code outer_error,
|
krb5_error_code outer_error,
|
||||||
const char *e_text,
|
const char *e_text,
|
||||||
krb5_principal error_client,
|
|
||||||
krb5_principal error_server,
|
krb5_principal error_server,
|
||||||
|
const PrincipalName *error_client_name,
|
||||||
|
const Realm *error_client_realm,
|
||||||
time_t *csec, int *cusec,
|
time_t *csec, int *cusec,
|
||||||
krb5_data *error_msg)
|
krb5_data *error_msg)
|
||||||
{
|
{
|
||||||
@@ -264,15 +265,16 @@ _kdc_fast_mk_error(krb5_context context,
|
|||||||
|
|
||||||
/* first add the KRB-ERROR to the fast errors */
|
/* first add the KRB-ERROR to the fast errors */
|
||||||
|
|
||||||
ret = krb5_mk_error(context,
|
ret = krb5_mk_error_ext(context,
|
||||||
outer_error,
|
outer_error,
|
||||||
e_text,
|
e_text,
|
||||||
NULL,
|
NULL,
|
||||||
error_client,
|
error_server,
|
||||||
error_server,
|
error_client_name,
|
||||||
NULL,
|
error_client_realm,
|
||||||
NULL,
|
NULL,
|
||||||
&e_data);
|
NULL,
|
||||||
|
&e_data);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
@@ -285,7 +287,8 @@ _kdc_fast_mk_error(krb5_context context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (/* hide_principal */ 0) {
|
if (/* hide_principal */ 0) {
|
||||||
error_client = NULL;
|
error_client_name = NULL;
|
||||||
|
error_client_realm = NULL;
|
||||||
error_server = NULL;
|
error_server = NULL;
|
||||||
e_text = NULL;
|
e_text = NULL;
|
||||||
}
|
}
|
||||||
@@ -325,15 +328,16 @@ _kdc_fast_mk_error(krb5_context context,
|
|||||||
krb5_abortx(context, "internal asn.1 error");
|
krb5_abortx(context, "internal asn.1 error");
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = krb5_mk_error(context,
|
ret = krb5_mk_error_ext(context,
|
||||||
outer_error,
|
outer_error,
|
||||||
e_text,
|
e_text,
|
||||||
(e_data.length ? &e_data : NULL),
|
(e_data.length ? &e_data : NULL),
|
||||||
error_client,
|
error_server,
|
||||||
error_server,
|
error_client_name,
|
||||||
csec,
|
error_client_realm,
|
||||||
cusec,
|
csec,
|
||||||
error_msg);
|
cusec,
|
||||||
|
error_msg);
|
||||||
krb5_data_free(&e_data);
|
krb5_data_free(&e_data);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@@ -2199,7 +2199,9 @@ out:
|
|||||||
r->armor_crypto,
|
r->armor_crypto,
|
||||||
&req->req_body,
|
&req->req_body,
|
||||||
ret, r->e_text,
|
ret, r->e_text,
|
||||||
r->client_princ, r->server_princ,
|
r->server_princ,
|
||||||
|
&r->client_princ->name,
|
||||||
|
&r->client_princ->realm,
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
reply);
|
reply);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@@ -2457,6 +2457,7 @@ out:
|
|||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
ret, NULL,
|
ret, NULL,
|
||||||
|
NULL,
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
csec, cusec,
|
csec, cusec,
|
||||||
data);
|
data);
|
||||||
|
Reference in New Issue
Block a user