gss_create_empty_oid_set.c revision 184588
168349Sobrien/*- 268349Sobrien * Copyright (c) 2008 Isilon Inc http://www.isilon.com/ 3330569Sgordon * Authors: Doug Rabson <dfr@rabson.org> 468349Sobrien * Developed with Red Inc: Alfred Perlstein <alfred@freebsd.org> 568349Sobrien * 668349Sobrien * Redistribution and use in source and binary forms, with or without 768349Sobrien * modification, are permitted provided that the following conditions 868349Sobrien * are met: 9267843Sdelphij * 1. Redistributions of source code must retain the above copyright 10267843Sdelphij * notice, this list of conditions and the following disclaimer. 1168349Sobrien * 2. Redistributions in binary form must reproduce the above copyright 12267843Sdelphij * notice, this list of conditions and the following disclaimer in the 13330569Sgordon * documentation and/or other materials provided with the distribution. 14330569Sgordon * 15330569Sgordon * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16330569Sgordon * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17186690Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18330569Sgordon * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19330569Sgordon * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20186690Sobrien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21330569Sgordon * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22330569Sgordon * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23267843Sdelphij * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24330569Sgordon * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25330569Sgordon * SUCH DAMAGE. 26330569Sgordon */ 27330569Sgordon 28330569Sgordon#include <sys/cdefs.h> 29330569Sgordon__FBSDID("$FreeBSD: head/sys/kgssapi/gss_create_empty_oid_set.c 184588 2008-11-03 10:38:00Z dfr $"); 30330569Sgordon 31330569Sgordon#include <sys/param.h> 32330569Sgordon#include <sys/kernel.h> 33330569Sgordon#include <sys/kobj.h> 34330569Sgordon#include <sys/malloc.h> 35330569Sgordon 36267843Sdelphij#include <kgssapi/gssapi.h> 37330569Sgordon#include <kgssapi/gssapi_impl.h> 38330569Sgordon 39330569SgordonOM_uint32 40330569Sgordongss_create_empty_oid_set(OM_uint32 *minor_status, 41267843Sdelphij gss_OID_set *oid_set) 42330569Sgordon{ 43330569Sgordon gss_OID_set set; 44330569Sgordon 45330569Sgordon *minor_status = 0; 46267843Sdelphij *oid_set = GSS_C_NO_OID_SET; 47330569Sgordon 48330569Sgordon set = malloc(sizeof(gss_OID_set_desc), M_GSSAPI, M_WAITOK); 49330569Sgordon 50330569Sgordon set->count = 0; 51330569Sgordon set->elements = 0; 52330569Sgordon *oid_set = set; 53159764Sobrien 54267843Sdelphij return (GSS_S_COMPLETE); 55186690Sobrien} 56159764Sobrien