kdc: Add ret to common svc req elements
We're logging SUCCESS even when the KDC sends error replies. That's because we're returning success to process_request() even when we send errors to clients. The error we want to send to the client, and that we succeed or fail to send it, are different statuses. Also, further move things into `r` and out of function arguments.
This commit is contained in:

committed by
Luke Howard

parent
5e3c0a7ce0
commit
fb3ea5b943
@@ -328,7 +328,6 @@ _kdc_fast_mk_error(astgs_request_t r,
|
||||
krb5_crypto armor_crypto,
|
||||
const KDC_REQ_BODY *req_body,
|
||||
krb5_error_code outer_error,
|
||||
const char *e_text,
|
||||
krb5_principal error_client,
|
||||
krb5_principal error_server,
|
||||
time_t *csec, int *cusec,
|
||||
@@ -369,7 +368,7 @@ _kdc_fast_mk_error(astgs_request_t r,
|
||||
|
||||
ret = krb5_mk_error(r->context,
|
||||
outer_error,
|
||||
e_text,
|
||||
r->e_text,
|
||||
NULL,
|
||||
error_client,
|
||||
error_server,
|
||||
@@ -393,7 +392,7 @@ _kdc_fast_mk_error(astgs_request_t r,
|
||||
}
|
||||
|
||||
outer_error = KRB5_KDC_ERR_MORE_PREAUTH_DATA_REQUIRED;
|
||||
e_text = NULL;
|
||||
r->e_text = NULL;
|
||||
if (r->fast.flags.requested_hidden_names) {
|
||||
error_client = NULL;
|
||||
error_server = NULL;
|
||||
@@ -435,7 +434,7 @@ _kdc_fast_mk_error(astgs_request_t r,
|
||||
|
||||
ret = krb5_mk_error(r->context,
|
||||
outer_error,
|
||||
e_text,
|
||||
r->e_text,
|
||||
(e_data.length ? &e_data : NULL),
|
||||
error_client,
|
||||
error_server,
|
||||
|
Reference in New Issue
Block a user