1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License").  You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22/*
23 * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24 * Use is subject to license terms.
25 */
26
27#ifndef	_RPC_RPCSYS_H
28#define	_RPC_RPCSYS_H
29
30#pragma ident	"%Z%%M%	%I%	%E% SMI"
31
32#include <sys/types.h>
33
34#ifdef	__cplusplus
35extern "C" {
36#endif
37
38enum rpcsys_op  { KRPC_REVAUTH };
39
40/*
41 * Private definitions for the krpc_sys/rpcsys system call.
42 *
43 * flavor_data for AUTH_DES and AUTH_KERB is NULL.
44 * flavor_data for RPCSEC_GSS is rpc_gss_OID.
45 *
46 */
47struct krpc_revauth_1 {
48	uid_t	uid;
49	int	rpcsec_flavor;
50	void	*flavor_data;
51};
52
53#ifdef _SYSCALL32
54struct krpc_revauth_132 {
55	uid32_t	uid;
56	int32_t	rpcsec_flavor;
57	caddr32_t flavor_data;
58};
59#endif /* _SYSCALL32 */
60
61struct krpc_revauth {
62	int	version;	/* initially 1 */
63	union	{
64		struct krpc_revauth_1 r;
65	} krpc_revauth_u;
66};
67#define	uid_1		krpc_revauth_u.r.uid
68#define	rpcsec_flavor_1	krpc_revauth_u.r.rpcsec_flavor
69#define	flavor_data_1	krpc_revauth_u.r.flavor_data
70
71#ifdef _SYSCALL32
72struct krpc_revauth32 {
73	int32_t	version;	/* initially 1 */
74	union	{
75		struct krpc_revauth_132 r;
76	} krpc_revauth_u;
77};
78#endif /* _SYSCALL32 */
79
80
81#ifdef _KERNEL
82
83extern	int	rpcsys(enum rpcsys_op opcode, void *arg);
84extern	int	sec_clnt_revoke(int, uid_t, cred_t *, void *, model_t);
85
86#endif
87
88#ifdef	__cplusplus
89}
90#endif
91
92#endif	/* _RPC_RPCSYS_H */
93