base: 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.

To fix this we'll add a `ret` field to the common service request state
structure, HEIM_SVC_REQUEST_DESC_COMMON_ELEMENTS /
heim_svc_req_desc_common_s.
This commit is contained in:
Nicolas Williams
2021-12-23 23:04:54 -06:00
committed by Luke Howard
parent 81077eea7b
commit 5e3c0a7ce0
2 changed files with 3 additions and 2 deletions

View File

@@ -820,7 +820,7 @@ heim_audit_trail(heim_svc_req_desc r, heim_error_code ret, const char *retname)
#define CASE(x) case x : retval = #x; break
if (retname) {
retval = retname;
} else switch (ret) {
} else switch (ret ? ret : r->ret) {
CASE(ENOMEM);
CASE(ENOENT);
CASE(EACCES);