diff options
Diffstat (limited to 'usr/src/lib/libgss/g_dsp_status.c')
| -rw-r--r-- | usr/src/lib/libgss/g_dsp_status.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/usr/src/lib/libgss/g_dsp_status.c b/usr/src/lib/libgss/g_dsp_status.c index 8ea9afacac..0d1da795de 100644 --- a/usr/src/lib/libgss/g_dsp_status.c +++ b/usr/src/lib/libgss/g_dsp_status.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * glue routine gss_display_status * @@ -66,18 +63,19 @@ gss_buffer_t status_string; gss_OID mech_type = (gss_OID) req_mech_type; gss_mechanism mech; - /* check the input parameters */ - if (!minor_status) - return (GSS_S_CALL_INACCESSIBLE_WRITE); + if (minor_status != NULL) + *minor_status = 0; - *minor_status = 0; + if (status_string != GSS_C_NO_BUFFER) { + status_string->length = 0; + status_string->value = NULL; + } - if (!message_context || status_string == NULL) + if (minor_status == NULL || + message_context == NULL || + status_string == GSS_C_NO_BUFFER) return (GSS_S_CALL_INACCESSIBLE_WRITE); - status_string->length = 0; - status_string->value = NULL; - /* we handle major status codes, and the mechs do the minor */ if (status_type == GSS_C_GSS_CODE) return (displayMajor(status_value, message_context, |
