18f55a568SDoug Rabson /*-
2*4d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause
35e53a4f9SPedro F. Giffuni *
48f55a568SDoug Rabson * Copyright (c) 2008 Doug Rabson
58f55a568SDoug Rabson * All rights reserved.
68f55a568SDoug Rabson *
78f55a568SDoug Rabson * Redistribution and use in source and binary forms, with or without
88f55a568SDoug Rabson * modification, are permitted provided that the following conditions
98f55a568SDoug Rabson * are met:
108f55a568SDoug Rabson * 1. Redistributions of source code must retain the above copyright
118f55a568SDoug Rabson * notice, this list of conditions and the following disclaimer.
128f55a568SDoug Rabson * 2. Redistributions in binary form must reproduce the above copyright
138f55a568SDoug Rabson * notice, this list of conditions and the following disclaimer in the
148f55a568SDoug Rabson * documentation and/or other materials provided with the distribution.
158f55a568SDoug Rabson *
168f55a568SDoug Rabson * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
178f55a568SDoug Rabson * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
188f55a568SDoug Rabson * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
198f55a568SDoug Rabson * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
208f55a568SDoug Rabson * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
218f55a568SDoug Rabson * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
228f55a568SDoug Rabson * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
238f55a568SDoug Rabson * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
248f55a568SDoug Rabson * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
258f55a568SDoug Rabson * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
268f55a568SDoug Rabson * SUCH DAMAGE.
278f55a568SDoug Rabson */
288f55a568SDoug Rabson
298f55a568SDoug Rabson #include <rpc/rpc.h>
308f55a568SDoug Rabson #include <rpc/rpcsec_gss.h>
318f55a568SDoug Rabson
328f55a568SDoug Rabson #include "rpcsec_gss_int.h"
338f55a568SDoug Rabson
348f55a568SDoug Rabson static rpc_gss_error_t _rpc_gss_error;
358f55a568SDoug Rabson
368f55a568SDoug Rabson void
_rpc_gss_set_error(int rpc_gss_error,int system_error)378f55a568SDoug Rabson _rpc_gss_set_error(int rpc_gss_error, int system_error)
388f55a568SDoug Rabson {
398f55a568SDoug Rabson
408f55a568SDoug Rabson _rpc_gss_error.rpc_gss_error = rpc_gss_error;
418f55a568SDoug Rabson _rpc_gss_error.system_error = system_error;
428f55a568SDoug Rabson }
438f55a568SDoug Rabson
448f55a568SDoug Rabson void
rpc_gss_get_error(rpc_gss_error_t * error)458f55a568SDoug Rabson rpc_gss_get_error(rpc_gss_error_t *error)
468f55a568SDoug Rabson {
478f55a568SDoug Rabson
488f55a568SDoug Rabson *error = _rpc_gss_error;
498f55a568SDoug Rabson }
50