krb5 commit: Enable interposing gss_inquire_attrs_for_mech()
Greg Hudson
ghudson at mit.edu
Mon Feb 15 23:23:10 EST 2016
https://github.com/krb5/krb5/commit/3be2b486058758cfcd16c8af0a8f560159e77cda
commit 3be2b486058758cfcd16c8af0a8f560159e77cda
Author: Robbie Harwood <rharwood at redhat.com>
Date: Mon Jan 11 17:50:39 2016 -0500
Enable interposing gss_inquire_attrs_for_mech()
Use gssint_select_mech_type() to locate an interposer mechanism, and
pass the public mech OID to the mech. Also call map_error() on the
resulting minor code.
ticket: 8330 (new)
src/lib/gssapi/mechglue/g_mechattr.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/lib/gssapi/mechglue/g_mechattr.c b/src/lib/gssapi/mechglue/g_mechattr.c
index e9299f4..57c0e52 100644
--- a/src/lib/gssapi/mechglue/g_mechattr.c
+++ b/src/lib/gssapi/mechglue/g_mechattr.c
@@ -160,6 +160,7 @@ gss_inquire_attrs_for_mech(
gss_OID_set *known_mech_attrs)
{
OM_uint32 status, tmpMinor;
+ gss_OID selected_mech, public_mech;
gss_mechanism mech;
if (minor == NULL)
@@ -173,14 +174,20 @@ gss_inquire_attrs_for_mech(
if (known_mech_attrs != NULL)
*known_mech_attrs = GSS_C_NO_OID_SET;
- mech = gssint_get_mechanism((gss_OID)mech_oid);
+ status = gssint_select_mech_type(minor, mech_oid, &selected_mech);
+ if (status != GSS_S_COMPLETE)
+ return status;
+
+ mech = gssint_get_mechanism(selected_mech);
if (mech != NULL && mech->gss_inquire_attrs_for_mech != NULL) {
- status = mech->gss_inquire_attrs_for_mech(minor,
- mech_oid,
+ public_mech = gssint_get_public_oid(selected_mech);
+ status = mech->gss_inquire_attrs_for_mech(minor, public_mech,
mech_attrs,
known_mech_attrs);
- if (GSS_ERROR(status))
+ if (GSS_ERROR(status)) {
+ map_error(minor, mech);
return status;
+ }
}
if (known_mech_attrs != NULL && *known_mech_attrs == GSS_C_NO_OID_SET) {
More information about the cvs-krb5
mailing list