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:
Nicolas Williams
2021-12-23 23:06:59 -06:00
committed by Luke Howard
parent 5e3c0a7ce0
commit fb3ea5b943
6 changed files with 34 additions and 22 deletions

View File

@@ -125,7 +125,7 @@ _kdc_audit_trail(kdc_request_t r, krb5_error_code ret)
/* Get a symbolic name for some error codes */
#define CASE(x) case x : retname = #x; break
switch (ret) {
switch (ret ? ret : r->ret) {
CASE(ENOMEM);
CASE(EACCES);
CASE(HDB_ERR_NOT_FOUND_HERE);