1*ba7b222eSGlenn Barry /*
2*ba7b222eSGlenn Barry  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3*ba7b222eSGlenn Barry  * Use is subject to license terms.
4*ba7b222eSGlenn Barry  */
5*ba7b222eSGlenn Barry /* -*- mode: c; indent-tabs-mode: nil -*- */
67c478bd9Sstevel@tonic-gate /*
77c478bd9Sstevel@tonic-gate  * Copyright 1993 by OpenVision Technologies, Inc.
87c478bd9Sstevel@tonic-gate  *
97c478bd9Sstevel@tonic-gate  * Permission to use, copy, modify, distribute, and sell this software
107c478bd9Sstevel@tonic-gate  * and its documentation for any purpose is hereby granted without fee,
117c478bd9Sstevel@tonic-gate  * provided that the above copyright notice appears in all copies and
127c478bd9Sstevel@tonic-gate  * that both that copyright notice and this permission notice appear in
137c478bd9Sstevel@tonic-gate  * supporting documentation, and that the name of OpenVision not be used
147c478bd9Sstevel@tonic-gate  * in advertising or publicity pertaining to distribution of the software
157c478bd9Sstevel@tonic-gate  * without specific, written prior permission. OpenVision makes no
167c478bd9Sstevel@tonic-gate  * representations about the suitability of this software for any
177c478bd9Sstevel@tonic-gate  * purpose.  It is provided "as is" without express or implied warranty.
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
207c478bd9Sstevel@tonic-gate  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
217c478bd9Sstevel@tonic-gate  * EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
227c478bd9Sstevel@tonic-gate  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
237c478bd9Sstevel@tonic-gate  * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
247c478bd9Sstevel@tonic-gate  * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
257c478bd9Sstevel@tonic-gate  * PERFORMANCE OF THIS SOFTWARE.
267c478bd9Sstevel@tonic-gate  */
277c478bd9Sstevel@tonic-gate 
28ab9b2e15Sgtb #include "gssapiP_krb5.h"
29*ba7b222eSGlenn Barry #include "mechglueP.h" /* SUNW17PACresync */
307c478bd9Sstevel@tonic-gate 
317c478bd9Sstevel@tonic-gate /*
32*ba7b222eSGlenn Barry  * $Id: get_tkt_flags.c 21778 2009-01-22 23:21:11Z tlyu $
337c478bd9Sstevel@tonic-gate  */
347c478bd9Sstevel@tonic-gate 
35ab9b2e15Sgtb OM_uint32 KRB5_CALLCONV
gss_krb5int_get_tkt_flags(OM_uint32 * minor_status,const gss_ctx_id_t context_handle,const gss_OID desired_object,gss_buffer_set_t * data_set)36*ba7b222eSGlenn Barry gss_krb5int_get_tkt_flags(OM_uint32 *minor_status,
37*ba7b222eSGlenn Barry                           const gss_ctx_id_t context_handle,
38*ba7b222eSGlenn Barry                           const gss_OID desired_object,
39*ba7b222eSGlenn Barry                           gss_buffer_set_t *data_set)
407c478bd9Sstevel@tonic-gate {
417c478bd9Sstevel@tonic-gate     krb5_gss_ctx_id_rec *ctx;
42*ba7b222eSGlenn Barry     gss_buffer_desc rep;
437c478bd9Sstevel@tonic-gate 
447c478bd9Sstevel@tonic-gate     ctx = (krb5_gss_ctx_id_rec *) context_handle;
457c478bd9Sstevel@tonic-gate 
46*ba7b222eSGlenn Barry     rep.value = &ctx->krb_flags;
47*ba7b222eSGlenn Barry     rep.length = sizeof(ctx->krb_flags);
487c478bd9Sstevel@tonic-gate 
49*ba7b222eSGlenn Barry     return generic_gss_add_buffer_set_member(minor_status, &rep, data_set);
507c478bd9Sstevel@tonic-gate }
51