1
/* -*- mode: c; indent-tabs-mode: nil -*- */
2
3
* Copyright 1993 by OpenVision Technologies, Inc.
4
5
* Permission to use, copy, modify, distribute, and sell this software
5
6
* and its documentation for any purpose is hereby granted without fee,
6
7
* provided that the above copyright notice appears in all copies and
10
11
* without specific, written prior permission. OpenVision makes no
11
12
* representations about the suitability of this software for any
12
13
* purpose. It is provided "as is" without express or implied warranty.
14
15
* OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15
16
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16
17
* EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
23
24
#include "gssapiP_krb5.h"
26
* $Id: get_tkt_flags.c 18131 2006-06-14 22:27:54Z tlyu $
27
* $Id: get_tkt_flags.c 21778 2009-01-22 23:21:11Z tlyu $
29
OM_uint32 KRB5_CALLCONV
30
gss_krb5int_get_tkt_flags(minor_status, context_handle, ticket_flags)
31
OM_uint32 *minor_status;
32
gss_ctx_id_t context_handle;
33
krb5_flags *ticket_flags;
30
OM_uint32 KRB5_CALLCONV
31
gss_krb5int_get_tkt_flags(OM_uint32 *minor_status,
32
const gss_ctx_id_t context_handle,
33
const gss_OID desired_object,
34
gss_buffer_set_t *data_set)
35
krb5_gss_ctx_id_rec *ctx;
37
/* validate the context handle */
38
if (! kg_validate_ctx_id(context_handle)) {
39
*minor_status = (OM_uint32) G_VALIDATE_FAILED;
40
return(GSS_S_NO_CONTEXT);
43
ctx = (krb5_gss_ctx_id_rec *) context_handle;
45
if (! ctx->established) {
46
*minor_status = KG_CTX_INCOMPLETE;
47
return(GSS_S_NO_CONTEXT);
51
*ticket_flags = ctx->krb_flags;
54
return(GSS_S_COMPLETE);
36
krb5_gss_ctx_id_rec *ctx;
39
ctx = (krb5_gss_ctx_id_rec *) context_handle;
41
rep.value = &ctx->krb_flags;
42
rep.length = sizeof(ctx->krb_flags);
44
return generic_gss_add_buffer_set_member(minor_status, &rep, data_set);