From 66a06abe4a687170882888bf52750abd3ce5afbf Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sat, 9 Aug 2014 11:49:14 -0400 Subject: We can handle only mech status codes Return an error if status_type is bogus. We can't call gss_display_status() for GSS_C_GSS_CODE because we'd loop back to ourselves as unfortunately the GSSAPI mechanisms SPI uses the same symbol names as the public API ... --- src/gss_err.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gss_err.c b/src/gss_err.c index dd43a49..712203d 100644 --- a/src/gss_err.c +++ b/src/gss_err.c @@ -27,7 +27,13 @@ uint32_t gssntlm_display_status(uint32_t *minor_status, return GSS_S_CALL_INACCESSIBLE_READ; } + if (status_type != GSS_C_MECH_CODE) { + *minor_status = EINVAL; + return GSS_S_BAD_STATUS; + } + *minor_status = 0; + *message_context = 0; status_string->length = 0; status_string->value = NULL; -- cgit