Fix tests/can and tests/kdc

krb5_kdc_process_request() must return 0 when it produces a reply, and only
return non-zero when it could not construct any kind of reply (e.g., ENOMEM, or
-1 if no handler claimed responsibility for the request).
This commit is contained in:
Nicolas Williams
2019-12-05 17:22:47 -06:00
parent 52b8fae5e0
commit b5c158d9f7
2 changed files with 12 additions and 12 deletions

View File

@@ -2395,18 +2395,17 @@ out:
* In case of a non proxy error, build an error message.
*/
if (ret != 0 && ret != HDB_ERR_NOT_FOUND_HERE && r->reply->length == 0)
/* We don't want to clobber the original error here... */
_kdc_fast_mk_error(r, &error_method,
r->armor_crypto,
&req->req_body,
ret, r->e_text,
r->server_princ,
r->client_princ ?
&r->client_princ->name : NULL,
r->client_princ ?
&r->client_princ->realm : NULL,
NULL, NULL,
r->reply);
ret = _kdc_fast_mk_error(r, &error_method,
r->armor_crypto,
&req->req_body,
ret, r->e_text,
r->server_princ,
r->client_princ ?
&r->client_princ->name : NULL,
r->client_princ ?
&r->client_princ->realm : NULL,
NULL, NULL,
r->reply);
free_EncTicketPart(&r->et);
free_EncKDCRepPart(&r->ek);

View File

@@ -25,4 +25,5 @@
[logging]
kdc = 0-/FILE:@objdir@/messages.log
kdc-replay = 0-/FILE:@objdir@/messages.log
default = 0-/FILE:@objdir@/messages.log