Path: blob/main/kerberos5/lib/libgssapi_spnego/freebsd_compat.c
39476 views
/*-1* SPDX-License-Identifier: BSD-2-Clause2*3* Copyright (c) 2008 Doug Rabson4* All rights reserved.5*6* Redistribution and use in source and binary forms, with or without7* modification, are permitted provided that the following conditions8* are met:9* 1. Redistributions of source code must retain the above copyright10* notice, this list of conditions and the following disclaimer.11* 2. Redistributions in binary form must reproduce the above copyright12* notice, this list of conditions and the following disclaimer in the13* documentation and/or other materials provided with the distribution.14*15* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND16* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE17* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE18* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE19* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL20* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS21* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)22* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT23* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY24* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF25* SUCH DAMAGE.26*/2728#include <gssapi/gssapi.h>29#include <mech_switch.h>3031gss_OID_desc __gss_c_nt_hostbased_service_oid_desc =32{10, (void *)("\x2a\x86\x48\x86\xf7\x12" "\x01\x02\x01\x04")};3334const char *35_gss_name_prefix(void)36{37return "_gss_spnego";38}3940void41gss_mg_collect_error(gss_OID mech, OM_uint32 maj, OM_uint32 min)42{43_gss_mg_collect_error(mech, maj, min);44}4546OM_uint32 _gss_spnego_display_status47(OM_uint32 * minor_status,48OM_uint32 status_value,49int status_type,50const gss_OID mech_type,51OM_uint32 * message_context,52gss_buffer_t status_string53)54{55return GSS_S_FAILURE;56}5758OM_uint32 _gss_spnego_add_cred (59OM_uint32 * minor_status,60const gss_cred_id_t input_cred_handle,61const gss_name_t desired_name,62const gss_OID desired_mech,63gss_cred_usage_t cred_usage,64OM_uint32 initiator_time_req,65OM_uint32 acceptor_time_req,66gss_cred_id_t * output_cred_handle,67gss_OID_set * actual_mechs,68OM_uint32 * initiator_time_rec,69OM_uint32 * acceptor_time_rec70)71{72return gss_add_cred(minor_status,73input_cred_handle,74desired_name,75desired_mech,76cred_usage,77initiator_time_req,78acceptor_time_req,79output_cred_handle,80actual_mechs,81initiator_time_rec,82acceptor_time_rec);83}848586