diff options
author | Greg Hudson <ghudson@mit.edu> | 2015-09-03 12:38:44 -0400 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2015-09-14 19:38:38 -0400 |
commit | 4e036ef4127a9b09d1a567472da1df24c55cdb89 (patch) | |
tree | 5bba7962c9458582b13f68886a018ead951e8a8b /src/kdc | |
parent | 67b21425aeb551b4489d5fbf7694e87beefbc701 (diff) | |
download | krb5-4e036ef4127a9b09d1a567472da1df24c55cdb89.zip krb5-4e036ef4127a9b09d1a567472da1df24c55cdb89.tar.gz krb5-4e036ef4127a9b09d1a567472da1df24c55cdb89.tar.bz2 |
Fix KDC client referrals
Although our built-in KDB modules do not support client referrals for
AS requests, the KDC is supposed to return one if a third-party module
returns a DB entry containing a principal in a foreign realm.
Unfortunately, this code has never worked; in prepare_error_as(), we
erroneously compare the protocol code errcode against the com_err code
KRB5KDC_ERR_WRONG_REALM; as a result, we never supply the canonical
client principal. Fix this by comparing errcode against the protocol
code KDC_ERR_WRONG_REALM instead.
Discovered by Alexander Bokovoy and Simo Sorce.
ticket: 8241 (new)
target_version: 1.13.3
tags: pullup
Diffstat (limited to 'src/kdc')
-rw-r--r-- | src/kdc/do_as_req.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/kdc/do_as_req.c b/src/kdc/do_as_req.c index 3a3ce8b..5440949 100644 --- a/src/kdc/do_as_req.c +++ b/src/kdc/do_as_req.c @@ -862,7 +862,7 @@ prepare_error_as(struct kdc_request_state *rstate, krb5_kdc_req *request, return retval; errpkt.error = error; errpkt.server = request->server; - errpkt.client = (error == KRB5KDC_ERR_WRONG_REALM) ? canon_client : + errpkt.client = (error == KDC_ERR_WRONG_REALM) ? canon_client : request->client; errpkt.text = string2data((char *)status); |