/*-1* SPDX-License-Identifier: BSD-2-Clause2*3* Copyright (c) 2005 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 <sys/param.h>29#include <kgssapi/gssapi.h>3031/*32* The implementation must reserve static storage for a33* gss_OID_desc object containing the value34* {10, (void *)"\x2a\x86\x48\x86\xf7\x12"35* "\x01\x02\x01\x01"},36* corresponding to an object-identifier value of37* {iso(1) member-body(2) United States(840) mit(113554)38* infosys(1) gssapi(2) generic(1) user_name(1)}. The constant39* GSS_C_NT_USER_NAME should be initialized to point40* to that gss_OID_desc.41*/42static gss_OID_desc GSS_C_NT_USER_NAME_storage =43{10, (void *)(uintptr_t)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x01"};44gss_OID GSS_C_NT_USER_NAME = &GSS_C_NT_USER_NAME_storage;4546/*47* The implementation must reserve static storage for a48* gss_OID_desc object containing the value49* {10, (void *)"\x2a\x86\x48\x86\xf7\x12"50* "\x01\x02\x01\x02"},51* corresponding to an object-identifier value of52* {iso(1) member-body(2) United States(840) mit(113554)53* infosys(1) gssapi(2) generic(1) machine_uid_name(2)}.54* The constant GSS_C_NT_MACHINE_UID_NAME should be55* initialized to point to that gss_OID_desc.56*/57static gss_OID_desc GSS_C_NT_MACHINE_UID_NAME_storage =58{10, (void *)(uintptr_t)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x02"};59gss_OID GSS_C_NT_MACHINE_UID_NAME = &GSS_C_NT_MACHINE_UID_NAME_storage;6061/*62* The implementation must reserve static storage for a63* gss_OID_desc object containing the value64* {10, (void *)"\x2a\x86\x48\x86\xf7\x12"65* "\x01\x02\x01\x03"},66* corresponding to an object-identifier value of67* {iso(1) member-body(2) United States(840) mit(113554)68* infosys(1) gssapi(2) generic(1) string_uid_name(3)}.69* The constant GSS_C_NT_STRING_UID_NAME should be70* initialized to point to that gss_OID_desc.71*/72static gss_OID_desc GSS_C_NT_STRING_UID_NAME_storage =73{10, (void *)(uintptr_t)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x03"};74gss_OID GSS_C_NT_STRING_UID_NAME = &GSS_C_NT_STRING_UID_NAME_storage;7576/*77* The implementation must reserve static storage for a78* gss_OID_desc object containing the value79* {6, (void *)"\x2b\x06\x01\x05\x06\x02"},80* corresponding to an object-identifier value of81* {iso(1) org(3) dod(6) internet(1) security(5)82* nametypes(6) gss-host-based-services(2)). The constant83* GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point84* to that gss_OID_desc. This is a deprecated OID value, and85* implementations wishing to support hostbased-service names86* should instead use the GSS_C_NT_HOSTBASED_SERVICE OID,87* defined below, to identify such names;88* GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym89* for GSS_C_NT_HOSTBASED_SERVICE when presented as an input90* parameter, but should not be emitted by GSS-API91* implementations92*/93static gss_OID_desc GSS_C_NT_HOSTBASED_SERVICE_X_storage =94{6, (void *)(uintptr_t)"\x2b\x06\x01\x05\x06\x02"};95gss_OID GSS_C_NT_HOSTBASED_SERVICE_X = &GSS_C_NT_HOSTBASED_SERVICE_X_storage;9697/*98* The implementation must reserve static storage for a99* gss_OID_desc object containing the value100* {10, (void *)"\x2a\x86\x48\x86\xf7\x12"101* "\x01\x02\x01\x04"}, corresponding to an102* object-identifier value of {iso(1) member-body(2)103* Unites States(840) mit(113554) infosys(1) gssapi(2)104* generic(1) service_name(4)}. The constant105* GSS_C_NT_HOSTBASED_SERVICE should be initialized106* to point to that gss_OID_desc.107*/108static gss_OID_desc GSS_C_NT_HOSTBASED_SERVICE_storage =109{10, (void *)(uintptr_t)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x04"};110gss_OID GSS_C_NT_HOSTBASED_SERVICE = &GSS_C_NT_HOSTBASED_SERVICE_storage;111112/*113* The implementation must reserve static storage for a114* gss_OID_desc object containing the value115* {6, (void *)"\x2b\x06\01\x05\x06\x03"},116* corresponding to an object identifier value of117* {1(iso), 3(org), 6(dod), 1(internet), 5(security),118* 6(nametypes), 3(gss-anonymous-name)}. The constant119* and GSS_C_NT_ANONYMOUS should be initialized to point120* to that gss_OID_desc.121*/122static gss_OID_desc GSS_C_NT_ANONYMOUS_storage =123{6, (void *)(uintptr_t)"\x2b\x06\01\x05\x06\x03"};124gss_OID GSS_C_NT_ANONYMOUS = &GSS_C_NT_ANONYMOUS_storage;125126/*127* The implementation must reserve static storage for a128* gss_OID_desc object containing the value129* {6, (void *)"\x2b\x06\x01\x05\x06\x04"},130* corresponding to an object-identifier value of131* {1(iso), 3(org), 6(dod), 1(internet), 5(security),132* 6(nametypes), 4(gss-api-exported-name)}. The constant133* GSS_C_NT_EXPORT_NAME should be initialized to point134* to that gss_OID_desc.135*/136static gss_OID_desc GSS_C_NT_EXPORT_NAME_storage =137{6, (void *)(uintptr_t)"\x2b\x06\x01\x05\x06\x04"};138gss_OID GSS_C_NT_EXPORT_NAME = &GSS_C_NT_EXPORT_NAME_storage;139140/*141* This name form shall be represented by the Object Identifier {iso(1)142* member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)143* krb5(2) krb5_name(1)}. The recommended symbolic name for this type144* is "GSS_KRB5_NT_PRINCIPAL_NAME".145*/146static gss_OID_desc GSS_KRB5_NT_PRINCIPAL_NAME_storage =147{10, (void *)(uintptr_t)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x01"};148gss_OID GSS_KRB5_NT_PRINCIPAL_NAME = &GSS_KRB5_NT_PRINCIPAL_NAME_storage;149150/*151* This name form shall be represented by the Object Identifier {iso(1)152* member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)153* generic(1) user_name(1)}. The recommended symbolic name for this154* type is "GSS_KRB5_NT_USER_NAME".155*/156gss_OID GSS_KRB5_NT_USER_NAME = &GSS_C_NT_USER_NAME_storage;157158/*159* This name form shall be represented by the Object Identifier {iso(1)160* member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)161* generic(1) machine_uid_name(2)}. The recommended symbolic name for162* this type is "GSS_KRB5_NT_MACHINE_UID_NAME".163*/164gss_OID GSS_KRB5_NT_MACHINE_UID_NAME = &GSS_C_NT_MACHINE_UID_NAME_storage;165166/*167* This name form shall be represented by the Object Identifier {iso(1)168* member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)169* generic(1) string_uid_name(3)}. The recommended symbolic name for170* this type is "GSS_KRB5_NT_STRING_UID_NAME".171*/172gss_OID GSS_KRB5_NT_STRING_UID_NAME = &GSS_C_NT_STRING_UID_NAME_storage;173174175