[krbdev.mit.edu #6898] Set correct minor_status value in call to gss_display_status.
Sriram Nambakam via RT
rt-comment at krbdev.mit.edu
Wed Apr 6 17:42:19 EDT 2011
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);
More information about the krb5-bugs
mailing list