Skip Menu |
 

Subject: Set correct minor_status value in call to gss_display_status.
Date: Wed, 6 Apr 2011 17:21:12 -0400
From: "Sriram Nambakam" <snambakam@likewise.com>
To: <krb5-bugs@mit.edu>

The call to g_make_string_buffer(…) returns 1 upon success and 0 upon failure.

So, set minor_status to ENOMEM only if a zero value was returned from the call to g_make_string_buffer.

If the minor_status was set to ENOMEM, return GSS_S_FAILURE.

 

Index: src/lib/gssapi/krb5/disp_status.c

===================================================================

--- src/lib/gssapi/krb5/disp_status.c   (revision 58144)

+++ src/lib/gssapi/krb5/disp_status.c   (working copy)

@@ -185,11 +185,16 @@

         /* If this fails, there's not much we can do...  */

         if (g_make_string_buffer(krb5_gss_get_error_message(status_value),

-                                 status_string) != 0)

+                                 status_string) == 0)

+        {

             *minor_status = ENOMEM;

+            return(GSS_S_FAILURE);

+        }

         else

+        {

             *minor_status = 0;

-        return 0;

+        }

+        return(GSS_S_COMPLETE);

     } else {

         *minor_status = 0;

         return(GSS_S_BAD_STATUS);

From: ghudson@mit.edu
Subject: SVN Commit

In krb5_gss_display_status, correct the sense of the
g_make_string_buffer test, and return GSS_S_FAILURE if it fails.
Reported by snambakam@likewise.com.


https://github.com/krb5/krb5/commit/fb67497ceeedf9a398cd670440f699e35b3baa4b
Commit By: ghudson
Revision: 24876
Changed Files:
U trunk/src/lib/gssapi/krb5/disp_status.c