96d71f74f7
Supersedes krb5-mechglue_inqure_attrs.patch
55 lines
2.0 KiB
Diff
55 lines
2.0 KiB
Diff
From 3be2b486058758cfcd16c8af0a8f560159e77cda Mon Sep 17 00:00:00 2001
|
|
From: Robbie Harwood <rharwood@redhat.com>
|
|
Date: Mon, 11 Jan 2016 17:50:39 -0500
|
|
Subject: [PATCH] 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 file 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) {
|
|
--
|
|
2.7.0
|
|
|