10Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI"
20Sstevel@tonic-gate
30Sstevel@tonic-gate /*
40Sstevel@tonic-gate * Copyright 1993 by OpenVision Technologies, Inc.
5*5053Sgtb *
60Sstevel@tonic-gate * Permission to use, copy, modify, distribute, and sell this software
70Sstevel@tonic-gate * and its documentation for any purpose is hereby granted without fee,
80Sstevel@tonic-gate * provided that the above copyright notice appears in all copies and
90Sstevel@tonic-gate * that both that copyright notice and this permission notice appear in
100Sstevel@tonic-gate * supporting documentation, and that the name of OpenVision not be used
110Sstevel@tonic-gate * in advertising or publicity pertaining to distribution of the software
120Sstevel@tonic-gate * without specific, written prior permission. OpenVision makes no
130Sstevel@tonic-gate * representations about the suitability of this software for any
140Sstevel@tonic-gate * purpose. It is provided "as is" without express or implied warranty.
15*5053Sgtb *
160Sstevel@tonic-gate * OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
170Sstevel@tonic-gate * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
180Sstevel@tonic-gate * EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
190Sstevel@tonic-gate * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
200Sstevel@tonic-gate * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
210Sstevel@tonic-gate * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
220Sstevel@tonic-gate * PERFORMANCE OF THIS SOFTWARE.
230Sstevel@tonic-gate */
240Sstevel@tonic-gate
25*5053Sgtb #include "gssapiP_krb5.h"
260Sstevel@tonic-gate
270Sstevel@tonic-gate OM_uint32
krb5_gss_release_name(minor_status,input_name)28*5053Sgtb krb5_gss_release_name(minor_status, input_name)
290Sstevel@tonic-gate OM_uint32 *minor_status;
300Sstevel@tonic-gate gss_name_t *input_name;
310Sstevel@tonic-gate {
32*5053Sgtb krb5_context context;
33*5053Sgtb krb5_error_code code;
340Sstevel@tonic-gate
35*5053Sgtb code = krb5_gss_init_context(&context);
36*5053Sgtb if (code) {
37*5053Sgtb *minor_status = code;
38*5053Sgtb return GSS_S_FAILURE;
39*5053Sgtb }
400Sstevel@tonic-gate
410Sstevel@tonic-gate if (! kg_validate_name(*input_name)) {
420Sstevel@tonic-gate *minor_status = (OM_uint32) G_VALIDATE_FAILED;
43*5053Sgtb krb5_free_context(context);
440Sstevel@tonic-gate return(GSS_S_CALL_BAD_STRUCTURE|GSS_S_BAD_NAME);
450Sstevel@tonic-gate }
460Sstevel@tonic-gate
470Sstevel@tonic-gate (void)kg_delete_name(*input_name);
480Sstevel@tonic-gate
490Sstevel@tonic-gate krb5_free_principal(context, (krb5_principal) *input_name);
50*5053Sgtb krb5_free_context(context);
510Sstevel@tonic-gate
520Sstevel@tonic-gate *input_name = (gss_name_t) NULL;
530Sstevel@tonic-gate
540Sstevel@tonic-gate *minor_status = 0;
550Sstevel@tonic-gate return(GSS_S_COMPLETE);
560Sstevel@tonic-gate }
57