xref: /illumos-gate/usr/src/uts/common/rpc/rpcsys.h (revision 20a7641f9918de8574b8b3b47dbe35c4bfc78df1)
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 #include <sys/types.h>
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 enum rpcsys_op  { KRPC_REVAUTH };
37 
38 /*
39  * Private definitions for the krpc_sys/rpcsys system call.
40  *
41  * flavor_data for AUTH_DES and AUTH_KERB is NULL.
42  * flavor_data for RPCSEC_GSS is rpc_gss_OID.
43  *
44  */
45 struct krpc_revauth_1 {
46 	uid_t	uid;
47 	int	rpcsec_flavor;
48 	void	*flavor_data;
49 };
50 
51 #ifdef _SYSCALL32
52 struct krpc_revauth_132 {
53 	uid32_t	uid;
54 	int32_t	rpcsec_flavor;
55 	caddr32_t flavor_data;
56 };
57 #endif /* _SYSCALL32 */
58 
59 struct krpc_revauth {
60 	int	version;	/* initially 1 */
61 	union	{
62 		struct krpc_revauth_1 r;
63 	} krpc_revauth_u;
64 };
65 #define	uid_1		krpc_revauth_u.r.uid
66 #define	rpcsec_flavor_1	krpc_revauth_u.r.rpcsec_flavor
67 #define	flavor_data_1	krpc_revauth_u.r.flavor_data
68 
69 #ifdef _SYSCALL32
70 struct krpc_revauth32 {
71 	int32_t	version;	/* initially 1 */
72 	union	{
73 		struct krpc_revauth_132 r;
74 	} krpc_revauth_u;
75 };
76 #endif /* _SYSCALL32 */
77 
78 
79 #ifdef _KERNEL
80 
81 extern	int	rpcsys(enum rpcsys_op opcode, void *arg);
82 extern	int	sec_clnt_revoke(int, uid_t, cred_t *, void *, model_t);
83 
84 #endif
85 
86 #ifdef	__cplusplus
87 }
88 #endif
89 
90 #endif	/* _RPC_RPCSYS_H */
91