[29060] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Fix error mappings for IOV MIC mechglue funcs

daemon@ATHENA.MIT.EDU (Greg Hudson)
Thu Sep 17 12:34:49 2015

Date: Thu, 17 Sep 2015 12:34:44 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201509171634.t8HGYigV012749@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/969c976ff021db7e409ce9a38d28316d9acfa2cc
commit 969c976ff021db7e409ce9a38d28316d9acfa2cc
Author: Tomas Kuthan <tkuthan@gmail.com>
Date:   Wed Sep 16 12:13:26 2015 +0200

    Fix error mappings for IOV MIC mechglue funcs
    
    The mechglue functions gss_get_mic_iov(), gss_get_mic_iov_length(),
    and gss_verify_mic_iov() don't call map_error() to map
    mechanism-specific error codes.  As a result, a subsequent call to
    gss_display_status() fails with GSS_S_BAD_MECH, because no translation
    for the error code is found in the error table.
    
    This patch adds the missing map_error call.
    
    [ghudson@mit.edu: correct a whitespace issue, edit commit message]
    
    ticket: 8246 (new)
    target_version: 1.13.3
    tags: pullup

 src/lib/gssapi/mechglue/g_unwrap_iov.c |    7 +++++--
 src/lib/gssapi/mechglue/g_wrap_iov.c   |   14 ++++++++++----
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/src/lib/gssapi/mechglue/g_unwrap_iov.c b/src/lib/gssapi/mechglue/g_unwrap_iov.c
index 9b95c01..c0dd314 100644
--- a/src/lib/gssapi/mechglue/g_unwrap_iov.c
+++ b/src/lib/gssapi/mechglue/g_unwrap_iov.c
@@ -133,6 +133,9 @@ gss_verify_mic_iov(OM_uint32 *minor_status, gss_ctx_id_t context_handle,
 	return GSS_S_BAD_MECH;
     if (mech->gss_verify_mic_iov == NULL)
 	return GSS_S_UNAVAILABLE;
-    return mech->gss_verify_mic_iov(minor_status, ctx->internal_ctx_id,
-				    qop_state, iov, iov_count);
+    status = mech->gss_verify_mic_iov(minor_status, ctx->internal_ctx_id,
+				      qop_state, iov, iov_count);
+    if (status != GSS_S_COMPLETE)
+	map_error(minor_status, mech);
+    return status;
 }
diff --git a/src/lib/gssapi/mechglue/g_wrap_iov.c b/src/lib/gssapi/mechglue/g_wrap_iov.c
index 17a2537..40cd98f 100644
--- a/src/lib/gssapi/mechglue/g_wrap_iov.c
+++ b/src/lib/gssapi/mechglue/g_wrap_iov.c
@@ -195,8 +195,11 @@ gss_get_mic_iov(OM_uint32 *minor_status, gss_ctx_id_t context_handle,
 	return GSS_S_BAD_MECH;
     if (mech->gss_get_mic_iov == NULL)
 	return GSS_S_UNAVAILABLE;
-    return mech->gss_get_mic_iov(minor_status, ctx->internal_ctx_id, qop_req,
-				 iov, iov_count);
+    status = mech->gss_get_mic_iov(minor_status, ctx->internal_ctx_id, qop_req,
+				   iov, iov_count);
+    if (status != GSS_S_COMPLETE)
+	map_error(minor_status, mech);
+    return status;
 }
 
 OM_uint32 KRB5_CALLCONV
@@ -220,8 +223,11 @@ gss_get_mic_iov_length(OM_uint32 *minor_status, gss_ctx_id_t context_handle,
 	return GSS_S_BAD_MECH;
     if (mech->gss_get_mic_iov_length == NULL)
 	return GSS_S_UNAVAILABLE;
-    return mech->gss_get_mic_iov_length(minor_status, ctx->internal_ctx_id,
-					qop_req, iov, iov_count);
+    status = mech->gss_get_mic_iov_length(minor_status, ctx->internal_ctx_id,
+					  qop_req, iov, iov_count);
+    if (status != GSS_S_COMPLETE)
+	map_error(minor_status, mech);
+    return status;
 }
 
 OM_uint32 KRB5_CALLCONV
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post