From 8888b88979c35e65739a374df8a84111a825b43e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Wed, 19 Mar 2008 08:57:49 +0000 Subject: [PATCH] kdc: Provide extended error information in AS-REP error replies. This change utilizes the addition of the e_data parameter to the windc_plugin in the heimdal code to pass extended information back to the client. The extended information is provided in an e-data block as part of the kerberos error message, and allows the client to determine which specific error condition occurred. From Andrew Kroeger and Andrew Bartlet git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22693 ec53bebd-3082-4978-b11e-865c3cabbd6b --- kdc/kerberos5.c | 2 +- kdc/windc.c | 5 +++-- kdc/windc_plugin.h | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/kdc/kerberos5.c b/kdc/kerberos5.c index 5c1d823d1..7c1a5754b 100644 --- a/kdc/kerberos5.c +++ b/kdc/kerberos5.c @@ -1050,7 +1050,7 @@ _kdc_as_rep(krb5_context context, goto out; } - ret = _kdc_windc_client_access(context, client, req); + ret = _kdc_windc_client_access(context, client, req, &e_data); if(ret) goto out; diff --git a/kdc/windc.c b/kdc/windc.c index 56978e6ad..3eb6f2239 100644 --- a/kdc/windc.c +++ b/kdc/windc.c @@ -101,9 +101,10 @@ _kdc_pac_verify(krb5_context context, krb5_error_code _kdc_windc_client_access(krb5_context context, struct hdb_entry_ex *client, - KDC_REQ *req) + KDC_REQ *req, + krb5_data *e_data) { if (windcft == NULL) return 0; - return (windcft->client_access)(windcctx, context, client, req); + return (windcft->client_access)(windcctx, context, client, req, e_data); } diff --git a/kdc/windc_plugin.h b/kdc/windc_plugin.h index 12ed212e9..3780258ad 100644 --- a/kdc/windc_plugin.h +++ b/kdc/windc_plugin.h @@ -64,10 +64,10 @@ typedef krb5_error_code typedef krb5_error_code (*krb5plugin_windc_client_access)( - void *, krb5_context, struct hdb_entry_ex *, KDC_REQ *); + void *, krb5_context, struct hdb_entry_ex *, KDC_REQ *, krb5_data *); -#define KRB5_WINDC_PLUGING_MINOR 2 +#define KRB5_WINDC_PLUGING_MINOR 3 typedef struct krb5plugin_windc_ftable { int minor_version;