From 5a59ab621c33a70ce89e397f12a357a537e7f226 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Wed, 21 Jan 2009 18:23:58 +0000 Subject: [PATCH] Patch from Luke: fix error return of krb5_gss_use_kdc_context git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21768 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/krb5/krb5_gss_glue.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lib/gssapi/krb5/krb5_gss_glue.c b/src/lib/gssapi/krb5/krb5_gss_glue.c index 5b7cbdf21..cd3459cd7 100644 --- a/src/lib/gssapi/krb5/krb5_gss_glue.c +++ b/src/lib/gssapi/krb5/krb5_gss_glue.c @@ -280,6 +280,7 @@ krb5_gss_use_kdc_context(void) OM_uint32 major_status; OM_uint32 minor_status; gss_buffer_desc req_buffer; + krb5_error_code ret; req_buffer.length = 0; req_buffer.value = NULL; @@ -289,7 +290,15 @@ krb5_gss_use_kdc_context(void) (const gss_OID)&req_oid, &req_buffer); - return major_status; + if (major_status != GSS_S_COMPLETE) { + if (minor_status != 0) + ret = (krb5_error_code)minor_status; + else + ret = KRB5KRB_ERR_GENERIC; + } else + ret = 0; + + return ret; } /* -- 2.26.2