1a9148abdSDoug Rabson /*-
2*4d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause
3fe267a55SPedro F. Giffuni *
4a9148abdSDoug Rabson * Copyright (c) 2008 Doug Rabson
5a9148abdSDoug Rabson * All rights reserved.
6a9148abdSDoug Rabson *
7a9148abdSDoug Rabson * Redistribution and use in source and binary forms, with or without
8a9148abdSDoug Rabson * modification, are permitted provided that the following conditions
9a9148abdSDoug Rabson * are met:
10a9148abdSDoug Rabson * 1. Redistributions of source code must retain the above copyright
11a9148abdSDoug Rabson * notice, this list of conditions and the following disclaimer.
12a9148abdSDoug Rabson * 2. Redistributions in binary form must reproduce the above copyright
13a9148abdSDoug Rabson * notice, this list of conditions and the following disclaimer in the
14a9148abdSDoug Rabson * documentation and/or other materials provided with the distribution.
15a9148abdSDoug Rabson *
16a9148abdSDoug Rabson * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17a9148abdSDoug Rabson * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18a9148abdSDoug Rabson * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19a9148abdSDoug Rabson * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20a9148abdSDoug Rabson * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21a9148abdSDoug Rabson * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22a9148abdSDoug Rabson * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23a9148abdSDoug Rabson * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24a9148abdSDoug Rabson * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25a9148abdSDoug Rabson * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26a9148abdSDoug Rabson * SUCH DAMAGE.
27a9148abdSDoug Rabson */
28a9148abdSDoug Rabson
29a9148abdSDoug Rabson #include <sys/param.h>
30a9148abdSDoug Rabson #include <sys/kobj.h>
31a9148abdSDoug Rabson #include <sys/malloc.h>
32a9148abdSDoug Rabson #include <rpc/rpc.h>
33a9148abdSDoug Rabson #include <rpc/rpcsec_gss.h>
34a9148abdSDoug Rabson
35a9148abdSDoug Rabson #include "rpcsec_gss_int.h"
36a9148abdSDoug Rabson
37a9148abdSDoug Rabson static rpc_gss_error_t _rpc_gss_error;
38a9148abdSDoug Rabson
39a9148abdSDoug Rabson void
_rpc_gss_set_error(int rpc_gss_error,int system_error)40a9148abdSDoug Rabson _rpc_gss_set_error(int rpc_gss_error, int system_error)
41a9148abdSDoug Rabson {
42a9148abdSDoug Rabson
43a9148abdSDoug Rabson _rpc_gss_error.rpc_gss_error = rpc_gss_error;
44a9148abdSDoug Rabson _rpc_gss_error.system_error = system_error;
45a9148abdSDoug Rabson }
46a9148abdSDoug Rabson
47a9148abdSDoug Rabson void
rpc_gss_get_error(rpc_gss_error_t * error)48a9148abdSDoug Rabson rpc_gss_get_error(rpc_gss_error_t *error)
49a9148abdSDoug Rabson {
50a9148abdSDoug Rabson
51a9148abdSDoug Rabson *error = _rpc_gss_error;
52a9148abdSDoug Rabson }
53