kdc: Ensure that we emit a non-zero error code

If ‘r->error_code’ was zero, we would turn it into an ERR_GENERIC error
and return that to the client. Now we return the actual error code
instead.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
This commit is contained in:
Joseph Sutton
2023-06-07 16:21:37 +12:00
committed by Nico Williams
parent af0b70fcc2
commit 243207f10a
2 changed files with 2 additions and 2 deletions

View File

@@ -2760,7 +2760,7 @@ out:
r->rep.padata,
r->armor_crypto,
&req->req_body,
r->error_code,
r->error_code ? r->error_code : ret,
r->client_princ,
r->server_princ,
NULL, NULL,

View File

@@ -2178,7 +2178,7 @@ out:
&error_method,
r->armor_crypto,
&req->req_body,
r->error_code,
r->error_code ? r->error_code : ret,
r->client_princ,
r->server_princ,
csec, cusec,