xref: /onnv-gate/usr/src/uts/common/nfs/nfs_acl.h (revision 0:68f95e015346)
1*0Sstevel@tonic-gate /*
2*0Sstevel@tonic-gate  * CDDL HEADER START
3*0Sstevel@tonic-gate  *
4*0Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*0Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*0Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*0Sstevel@tonic-gate  * with the License.
8*0Sstevel@tonic-gate  *
9*0Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*0Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*0Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*0Sstevel@tonic-gate  * and limitations under the License.
13*0Sstevel@tonic-gate  *
14*0Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*0Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*0Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*0Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*0Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*0Sstevel@tonic-gate  *
20*0Sstevel@tonic-gate  * CDDL HEADER END
21*0Sstevel@tonic-gate  */
22*0Sstevel@tonic-gate /*
23*0Sstevel@tonic-gate  *	Copyright 2004 Sun Microsystems, Inc.
24*0Sstevel@tonic-gate  *	All rights reserved.
25*0Sstevel@tonic-gate  *	Use is subject to license terms.
26*0Sstevel@tonic-gate  */
27*0Sstevel@tonic-gate 
28*0Sstevel@tonic-gate #ifndef _NFS_NFS_ACL_H
29*0Sstevel@tonic-gate #define	_NFS_NFS_ACL_H
30*0Sstevel@tonic-gate 
31*0Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
32*0Sstevel@tonic-gate 
33*0Sstevel@tonic-gate #ifdef	__cplusplus
34*0Sstevel@tonic-gate extern "C" {
35*0Sstevel@tonic-gate #endif
36*0Sstevel@tonic-gate 
37*0Sstevel@tonic-gate #define	NFS_ACL_MAX_ENTRIES	1024
38*0Sstevel@tonic-gate 
39*0Sstevel@tonic-gate typedef ushort_t o_mode;
40*0Sstevel@tonic-gate 
41*0Sstevel@tonic-gate struct aclent {
42*0Sstevel@tonic-gate 	int type;
43*0Sstevel@tonic-gate 	uid32_t id;
44*0Sstevel@tonic-gate 	o_mode perm;
45*0Sstevel@tonic-gate };
46*0Sstevel@tonic-gate typedef struct aclent aclent;
47*0Sstevel@tonic-gate 
48*0Sstevel@tonic-gate #define	NA_USER_OBJ	0x1
49*0Sstevel@tonic-gate #define	NA_USER		0x2
50*0Sstevel@tonic-gate #define	NA_GROUP_OBJ	0x4
51*0Sstevel@tonic-gate #define	NA_GROUP	0x8
52*0Sstevel@tonic-gate #define	NA_CLASS_OBJ	0x10
53*0Sstevel@tonic-gate #define	NA_OTHER_OBJ	0x20
54*0Sstevel@tonic-gate #define	NA_ACL_DEFAULT	0x1000
55*0Sstevel@tonic-gate 
56*0Sstevel@tonic-gate #define	NA_READ		0x4
57*0Sstevel@tonic-gate #define	NA_WRITE	0x2
58*0Sstevel@tonic-gate #define	NA_EXEC		0x1
59*0Sstevel@tonic-gate 
60*0Sstevel@tonic-gate struct secattr {
61*0Sstevel@tonic-gate 	uint32 mask;
62*0Sstevel@tonic-gate 	int aclcnt;
63*0Sstevel@tonic-gate 	struct {
64*0Sstevel@tonic-gate 		uint_t aclent_len;
65*0Sstevel@tonic-gate 		aclent *aclent_val;
66*0Sstevel@tonic-gate 	} aclent;
67*0Sstevel@tonic-gate 	int dfaclcnt;
68*0Sstevel@tonic-gate 	struct {
69*0Sstevel@tonic-gate 		uint_t dfaclent_len;
70*0Sstevel@tonic-gate 		aclent *dfaclent_val;
71*0Sstevel@tonic-gate 	} dfaclent;
72*0Sstevel@tonic-gate };
73*0Sstevel@tonic-gate typedef struct secattr secattr;
74*0Sstevel@tonic-gate 
75*0Sstevel@tonic-gate #define	NA_ACL		0x1
76*0Sstevel@tonic-gate #define	NA_ACLCNT	0x2
77*0Sstevel@tonic-gate #define	NA_DFACL	0x4
78*0Sstevel@tonic-gate #define	NA_DFACLCNT	0x8
79*0Sstevel@tonic-gate 
80*0Sstevel@tonic-gate struct GETACL2args {
81*0Sstevel@tonic-gate 	fhandle_t fh;
82*0Sstevel@tonic-gate 	uint32 mask;
83*0Sstevel@tonic-gate };
84*0Sstevel@tonic-gate typedef struct GETACL2args GETACL2args;
85*0Sstevel@tonic-gate 
86*0Sstevel@tonic-gate struct GETACL2resok {
87*0Sstevel@tonic-gate 	struct nfsfattr attr;
88*0Sstevel@tonic-gate 	vsecattr_t acl;
89*0Sstevel@tonic-gate };
90*0Sstevel@tonic-gate typedef struct GETACL2resok GETACL2resok;
91*0Sstevel@tonic-gate 
92*0Sstevel@tonic-gate struct GETACL2res {
93*0Sstevel@tonic-gate 	enum nfsstat status;
94*0Sstevel@tonic-gate 	union {
95*0Sstevel@tonic-gate 		GETACL2resok ok;
96*0Sstevel@tonic-gate 	} res_u;
97*0Sstevel@tonic-gate };
98*0Sstevel@tonic-gate typedef struct GETACL2res GETACL2res;
99*0Sstevel@tonic-gate 
100*0Sstevel@tonic-gate struct SETACL2args {
101*0Sstevel@tonic-gate 	fhandle_t fh;
102*0Sstevel@tonic-gate 	vsecattr_t acl;
103*0Sstevel@tonic-gate };
104*0Sstevel@tonic-gate typedef struct SETACL2args SETACL2args;
105*0Sstevel@tonic-gate 
106*0Sstevel@tonic-gate struct SETACL2resok {
107*0Sstevel@tonic-gate 	struct nfsfattr attr;
108*0Sstevel@tonic-gate };
109*0Sstevel@tonic-gate typedef struct SETACL2resok SETACL2resok;
110*0Sstevel@tonic-gate 
111*0Sstevel@tonic-gate struct SETACL2res {
112*0Sstevel@tonic-gate 	enum nfsstat status;
113*0Sstevel@tonic-gate 	union {
114*0Sstevel@tonic-gate 		SETACL2resok ok;
115*0Sstevel@tonic-gate 	} res_u;
116*0Sstevel@tonic-gate };
117*0Sstevel@tonic-gate typedef struct SETACL2res SETACL2res;
118*0Sstevel@tonic-gate 
119*0Sstevel@tonic-gate struct GETATTR2args {
120*0Sstevel@tonic-gate 	fhandle_t fh;
121*0Sstevel@tonic-gate };
122*0Sstevel@tonic-gate typedef struct GETATTR2args GETATTR2args;
123*0Sstevel@tonic-gate 
124*0Sstevel@tonic-gate struct GETATTR2resok {
125*0Sstevel@tonic-gate 	struct nfsfattr attr;
126*0Sstevel@tonic-gate };
127*0Sstevel@tonic-gate typedef struct GETATTR2resok GETATTR2resok;
128*0Sstevel@tonic-gate 
129*0Sstevel@tonic-gate struct GETATTR2res {
130*0Sstevel@tonic-gate 	enum nfsstat status;
131*0Sstevel@tonic-gate 	union {
132*0Sstevel@tonic-gate 		GETATTR2resok ok;
133*0Sstevel@tonic-gate 	} res_u;
134*0Sstevel@tonic-gate };
135*0Sstevel@tonic-gate typedef struct GETATTR2res GETATTR2res;
136*0Sstevel@tonic-gate 
137*0Sstevel@tonic-gate struct ACCESS2args {
138*0Sstevel@tonic-gate 	fhandle_t fh;
139*0Sstevel@tonic-gate 	uint32 access;
140*0Sstevel@tonic-gate };
141*0Sstevel@tonic-gate typedef struct ACCESS2args ACCESS2args;
142*0Sstevel@tonic-gate 
143*0Sstevel@tonic-gate #define	ACCESS2_READ	0x1
144*0Sstevel@tonic-gate #define	ACCESS2_LOOKUP	0x2
145*0Sstevel@tonic-gate #define	ACCESS2_MODIFY	0x4
146*0Sstevel@tonic-gate #define	ACCESS2_EXTEND	0x8
147*0Sstevel@tonic-gate #define	ACCESS2_DELETE	0x10
148*0Sstevel@tonic-gate #define	ACCESS2_EXECUTE	0x20
149*0Sstevel@tonic-gate 
150*0Sstevel@tonic-gate struct ACCESS2resok {
151*0Sstevel@tonic-gate 	struct nfsfattr attr;
152*0Sstevel@tonic-gate 	uint32 access;
153*0Sstevel@tonic-gate };
154*0Sstevel@tonic-gate typedef struct ACCESS2resok ACCESS2resok;
155*0Sstevel@tonic-gate 
156*0Sstevel@tonic-gate struct ACCESS2res {
157*0Sstevel@tonic-gate 	enum nfsstat status;
158*0Sstevel@tonic-gate 	union {
159*0Sstevel@tonic-gate 		ACCESS2resok ok;
160*0Sstevel@tonic-gate 	} res_u;
161*0Sstevel@tonic-gate };
162*0Sstevel@tonic-gate typedef struct ACCESS2res ACCESS2res;
163*0Sstevel@tonic-gate 
164*0Sstevel@tonic-gate struct GETXATTRDIR2args {
165*0Sstevel@tonic-gate 	fhandle_t fh;
166*0Sstevel@tonic-gate 	bool_t create;
167*0Sstevel@tonic-gate };
168*0Sstevel@tonic-gate typedef struct GETXATTRDIR2args GETXATTRDIR2args;
169*0Sstevel@tonic-gate 
170*0Sstevel@tonic-gate struct GETXATTRDIR2resok {
171*0Sstevel@tonic-gate 	fhandle_t fh;
172*0Sstevel@tonic-gate 	struct nfsfattr attr;
173*0Sstevel@tonic-gate };
174*0Sstevel@tonic-gate typedef struct GETXATTRDIR2resok GETXATTRDIR2resok;
175*0Sstevel@tonic-gate 
176*0Sstevel@tonic-gate struct GETXATTRDIR2res {
177*0Sstevel@tonic-gate 	enum nfsstat status;
178*0Sstevel@tonic-gate 	union {
179*0Sstevel@tonic-gate 		GETXATTRDIR2resok ok;
180*0Sstevel@tonic-gate 	} res_u;
181*0Sstevel@tonic-gate };
182*0Sstevel@tonic-gate typedef struct GETXATTRDIR2res GETXATTRDIR2res;
183*0Sstevel@tonic-gate 
184*0Sstevel@tonic-gate struct GETACL3args {
185*0Sstevel@tonic-gate 	nfs_fh3 fh;
186*0Sstevel@tonic-gate 	uint32 mask;
187*0Sstevel@tonic-gate };
188*0Sstevel@tonic-gate typedef struct GETACL3args GETACL3args;
189*0Sstevel@tonic-gate 
190*0Sstevel@tonic-gate struct GETACL3resok {
191*0Sstevel@tonic-gate 	post_op_attr attr;
192*0Sstevel@tonic-gate 	vsecattr_t acl;
193*0Sstevel@tonic-gate };
194*0Sstevel@tonic-gate typedef struct GETACL3resok GETACL3resok;
195*0Sstevel@tonic-gate 
196*0Sstevel@tonic-gate struct GETACL3resfail {
197*0Sstevel@tonic-gate 	post_op_attr attr;
198*0Sstevel@tonic-gate };
199*0Sstevel@tonic-gate typedef struct GETACL3resfail GETACL3resfail;
200*0Sstevel@tonic-gate 
201*0Sstevel@tonic-gate struct GETACL3res {
202*0Sstevel@tonic-gate 	nfsstat3 status;
203*0Sstevel@tonic-gate 	union {
204*0Sstevel@tonic-gate 		GETACL3resok ok;
205*0Sstevel@tonic-gate 		GETACL3resfail fail;
206*0Sstevel@tonic-gate 	} res_u;
207*0Sstevel@tonic-gate };
208*0Sstevel@tonic-gate typedef struct GETACL3res GETACL3res;
209*0Sstevel@tonic-gate 
210*0Sstevel@tonic-gate struct SETACL3args {
211*0Sstevel@tonic-gate 	nfs_fh3 fh;
212*0Sstevel@tonic-gate 	vsecattr_t acl;
213*0Sstevel@tonic-gate };
214*0Sstevel@tonic-gate typedef struct SETACL3args SETACL3args;
215*0Sstevel@tonic-gate 
216*0Sstevel@tonic-gate struct SETACL3resok {
217*0Sstevel@tonic-gate 	post_op_attr attr;
218*0Sstevel@tonic-gate };
219*0Sstevel@tonic-gate typedef struct SETACL3resok SETACL3resok;
220*0Sstevel@tonic-gate 
221*0Sstevel@tonic-gate struct SETACL3resfail {
222*0Sstevel@tonic-gate 	post_op_attr attr;
223*0Sstevel@tonic-gate };
224*0Sstevel@tonic-gate typedef struct SETACL3resfail SETACL3resfail;
225*0Sstevel@tonic-gate 
226*0Sstevel@tonic-gate struct SETACL3res {
227*0Sstevel@tonic-gate 	nfsstat3 status;
228*0Sstevel@tonic-gate 	union {
229*0Sstevel@tonic-gate 		SETACL3resok ok;
230*0Sstevel@tonic-gate 		SETACL3resfail fail;
231*0Sstevel@tonic-gate 	} res_u;
232*0Sstevel@tonic-gate };
233*0Sstevel@tonic-gate typedef struct SETACL3res SETACL3res;
234*0Sstevel@tonic-gate 
235*0Sstevel@tonic-gate struct GETXATTRDIR3args {
236*0Sstevel@tonic-gate 	nfs_fh3 fh;
237*0Sstevel@tonic-gate 	bool_t create;
238*0Sstevel@tonic-gate };
239*0Sstevel@tonic-gate typedef struct GETXATTRDIR3args GETXATTRDIR3args;
240*0Sstevel@tonic-gate 
241*0Sstevel@tonic-gate struct GETXATTRDIR3resok {
242*0Sstevel@tonic-gate 	nfs_fh3 fh;
243*0Sstevel@tonic-gate 	post_op_attr attr;
244*0Sstevel@tonic-gate };
245*0Sstevel@tonic-gate typedef struct GETXATTRDIR3resok GETXATTRDIR3resok;
246*0Sstevel@tonic-gate 
247*0Sstevel@tonic-gate struct GETXATTRDIR3res {
248*0Sstevel@tonic-gate 	nfsstat3 status;
249*0Sstevel@tonic-gate 	union {
250*0Sstevel@tonic-gate 		GETXATTRDIR3resok ok;
251*0Sstevel@tonic-gate 	} res_u;
252*0Sstevel@tonic-gate };
253*0Sstevel@tonic-gate typedef struct GETXATTRDIR3res GETXATTRDIR3res;
254*0Sstevel@tonic-gate 
255*0Sstevel@tonic-gate #define	NFS_ACL_PROGRAM	((rpcprog_t)(100227))
256*0Sstevel@tonic-gate #define	NFS_ACL_VERSMIN	((rpcvers_t)(2))
257*0Sstevel@tonic-gate #define	NFS_ACL_VERSMAX	((rpcvers_t)(3))
258*0Sstevel@tonic-gate 
259*0Sstevel@tonic-gate #define	NFS_ACL_V2		((rpcvers_t)(2))
260*0Sstevel@tonic-gate #define	ACLPROC2_NULL		((rpcproc_t)(0))
261*0Sstevel@tonic-gate #define	ACLPROC2_GETACL		((rpcproc_t)(1))
262*0Sstevel@tonic-gate #define	ACLPROC2_SETACL		((rpcproc_t)(2))
263*0Sstevel@tonic-gate #define	ACLPROC2_GETATTR	((rpcproc_t)(3))
264*0Sstevel@tonic-gate #define	ACLPROC2_ACCESS		((rpcproc_t)(4))
265*0Sstevel@tonic-gate #define	ACLPROC2_GETXATTRDIR	((rpcproc_t)(5))
266*0Sstevel@tonic-gate 
267*0Sstevel@tonic-gate #define	NFS_ACL_V3		((rpcvers_t)(3))
268*0Sstevel@tonic-gate #define	ACLPROC3_NULL		((rpcproc_t)(0))
269*0Sstevel@tonic-gate #define	ACLPROC3_GETACL		((rpcproc_t)(1))
270*0Sstevel@tonic-gate #define	ACLPROC3_SETACL		((rpcproc_t)(2))
271*0Sstevel@tonic-gate #define	ACLPROC3_GETXATTRDIR	((rpcproc_t)(3))
272*0Sstevel@tonic-gate 
273*0Sstevel@tonic-gate #ifdef _KERNEL
274*0Sstevel@tonic-gate /* the xdr functions */
275*0Sstevel@tonic-gate extern bool_t xdr_uid(XDR *, uid32_t *);
276*0Sstevel@tonic-gate extern bool_t xdr_o_mode(XDR *, o_mode *);
277*0Sstevel@tonic-gate extern bool_t xdr_aclent(XDR *, aclent_t *);
278*0Sstevel@tonic-gate extern bool_t xdr_secattr(XDR *, vsecattr_t *);
279*0Sstevel@tonic-gate 
280*0Sstevel@tonic-gate extern bool_t xdr_GETACL2args(XDR *, GETACL2args *);
281*0Sstevel@tonic-gate extern bool_t xdr_fastGETACL2args(XDR *, GETACL2args **);
282*0Sstevel@tonic-gate extern bool_t xdr_GETACL2resok(XDR *, GETACL2resok *);
283*0Sstevel@tonic-gate extern bool_t xdr_GETACL2res(XDR *, GETACL2res *);
284*0Sstevel@tonic-gate extern bool_t xdr_SETACL2args(XDR *, SETACL2args *);
285*0Sstevel@tonic-gate extern bool_t xdr_SETACL2resok(XDR *, SETACL2resok *);
286*0Sstevel@tonic-gate #ifdef _LITTLE_ENDIAN
287*0Sstevel@tonic-gate extern bool_t xdr_fastSETACL2resok(XDR *, SETACL2resok *);
288*0Sstevel@tonic-gate #endif
289*0Sstevel@tonic-gate extern bool_t xdr_SETACL2res(XDR *, SETACL2res *);
290*0Sstevel@tonic-gate #ifdef _LITTLE_ENDIAN
291*0Sstevel@tonic-gate extern bool_t xdr_fastSETACL2res(XDR *, SETACL2res *);
292*0Sstevel@tonic-gate #endif
293*0Sstevel@tonic-gate extern bool_t xdr_GETATTR2args(XDR *, GETATTR2args *);
294*0Sstevel@tonic-gate extern bool_t xdr_fastGETATTR2args(XDR *, GETATTR2args **);
295*0Sstevel@tonic-gate extern bool_t xdr_GETATTR2resok(XDR *, GETATTR2resok *);
296*0Sstevel@tonic-gate #ifdef _LITTLE_ENDIAN
297*0Sstevel@tonic-gate extern bool_t xdr_fastGETATTR2resok(XDR *, GETATTR2resok *);
298*0Sstevel@tonic-gate #endif
299*0Sstevel@tonic-gate extern bool_t xdr_GETATTR2res(XDR *, GETATTR2res *);
300*0Sstevel@tonic-gate #ifdef _LITTLE_ENDIAN
301*0Sstevel@tonic-gate extern bool_t xdr_fastGETATTR2res(XDR *, GETATTR2res *);
302*0Sstevel@tonic-gate #endif
303*0Sstevel@tonic-gate extern bool_t xdr_ACCESS2args(XDR *, ACCESS2args *);
304*0Sstevel@tonic-gate extern bool_t xdr_fastACCESS2args(XDR *, ACCESS2args **);
305*0Sstevel@tonic-gate extern bool_t xdr_ACCESS2resok(XDR *, ACCESS2resok *);
306*0Sstevel@tonic-gate #ifdef _LITTLE_ENDIAN
307*0Sstevel@tonic-gate extern bool_t xdr_fastACCESS2resok(XDR *, ACCESS2resok *);
308*0Sstevel@tonic-gate #endif
309*0Sstevel@tonic-gate extern bool_t xdr_ACCESS2res(XDR *, ACCESS2res *);
310*0Sstevel@tonic-gate #ifdef _LITTLE_ENDIAN
311*0Sstevel@tonic-gate extern bool_t xdr_fastACCESS2res(XDR *, ACCESS2res *);
312*0Sstevel@tonic-gate #endif
313*0Sstevel@tonic-gate extern bool_t xdr_GETXATTRDIR2args(XDR *, GETXATTRDIR2args *);
314*0Sstevel@tonic-gate extern bool_t xdr_GETXATTRDIR2res(XDR *, GETXATTRDIR2res *);
315*0Sstevel@tonic-gate 
316*0Sstevel@tonic-gate extern bool_t xdr_GETACL3args(XDR *, GETACL3args *);
317*0Sstevel@tonic-gate extern bool_t xdr_GETACL3resok(XDR *, GETACL3resok *);
318*0Sstevel@tonic-gate extern bool_t xdr_GETACL3resfail(XDR *, GETACL3resfail *);
319*0Sstevel@tonic-gate extern bool_t xdr_GETACL3res(XDR *, GETACL3res *);
320*0Sstevel@tonic-gate extern bool_t xdr_SETACL3args(XDR *, SETACL3args *);
321*0Sstevel@tonic-gate extern bool_t xdr_SETACL3resok(XDR *, SETACL3resok *);
322*0Sstevel@tonic-gate extern bool_t xdr_SETACL3resfail(XDR *, SETACL3resfail *);
323*0Sstevel@tonic-gate extern bool_t xdr_SETACL3res(XDR *, SETACL3res *);
324*0Sstevel@tonic-gate extern bool_t xdr_GETXATTRDIR3args(XDR *, GETXATTRDIR3args *);
325*0Sstevel@tonic-gate extern bool_t xdr_GETXATTRDIR3res(XDR *, GETXATTRDIR3res *);
326*0Sstevel@tonic-gate 
327*0Sstevel@tonic-gate #endif
328*0Sstevel@tonic-gate 
329*0Sstevel@tonic-gate #ifdef _KERNEL
330*0Sstevel@tonic-gate /* the service procedures */
331*0Sstevel@tonic-gate extern void acl2_getacl(GETACL2args *, GETACL2res *,
332*0Sstevel@tonic-gate 			struct exportinfo *, struct svc_req *, cred_t *);
333*0Sstevel@tonic-gate extern fhandle_t *acl2_getacl_getfh(GETACL2args *);
334*0Sstevel@tonic-gate extern void acl2_getacl_free(GETACL2res *);
335*0Sstevel@tonic-gate extern void acl2_setacl(SETACL2args *, SETACL2res *,
336*0Sstevel@tonic-gate 			struct exportinfo *, struct svc_req *, cred_t *);
337*0Sstevel@tonic-gate extern fhandle_t *acl2_setacl_getfh(SETACL2args *);
338*0Sstevel@tonic-gate extern void acl2_getattr(GETATTR2args *, GETATTR2res *,
339*0Sstevel@tonic-gate 			struct exportinfo *, struct svc_req *, cred_t *);
340*0Sstevel@tonic-gate extern fhandle_t *acl2_getattr_getfh(GETATTR2args *);
341*0Sstevel@tonic-gate extern void acl2_access(ACCESS2args *, ACCESS2res *,
342*0Sstevel@tonic-gate 			struct exportinfo *, struct svc_req *, cred_t *);
343*0Sstevel@tonic-gate extern fhandle_t *acl2_access_getfh(ACCESS2args *);
344*0Sstevel@tonic-gate extern void acl2_getxattrdir(GETXATTRDIR2args *, GETXATTRDIR2res *,
345*0Sstevel@tonic-gate 			struct exportinfo *, struct svc_req *, cred_t *);
346*0Sstevel@tonic-gate extern fhandle_t *acl2_getxattrdir_getfh(GETXATTRDIR2args *);
347*0Sstevel@tonic-gate 
348*0Sstevel@tonic-gate extern void acl3_getacl(GETACL3args *, GETACL3res *,
349*0Sstevel@tonic-gate 			struct exportinfo *, struct svc_req *, cred_t *);
350*0Sstevel@tonic-gate extern fhandle_t *acl3_getacl_getfh(GETACL3args *);
351*0Sstevel@tonic-gate extern void acl3_getacl_free(GETACL3res *);
352*0Sstevel@tonic-gate extern void acl3_setacl(SETACL3args *, SETACL3res *,
353*0Sstevel@tonic-gate 			struct exportinfo *, struct svc_req *, cred_t *);
354*0Sstevel@tonic-gate extern fhandle_t *acl3_setacl_getfh(SETACL3args *);
355*0Sstevel@tonic-gate extern void acl3_getxattrdir(GETXATTRDIR3args *, GETXATTRDIR3res *,
356*0Sstevel@tonic-gate 			struct exportinfo *, struct svc_req *, cred_t *);
357*0Sstevel@tonic-gate extern fhandle_t *acl3_getxattrdir_getfh(GETXATTRDIR3args *);
358*0Sstevel@tonic-gate 
359*0Sstevel@tonic-gate #endif
360*0Sstevel@tonic-gate 
361*0Sstevel@tonic-gate #ifdef _KERNEL
362*0Sstevel@tonic-gate /* the client side procedures */
363*0Sstevel@tonic-gate extern int acl_getacl2(vnode_t *, vsecattr_t *, int, cred_t *);
364*0Sstevel@tonic-gate extern int acl_setacl2(vnode_t *, vsecattr_t *, int, cred_t *);
365*0Sstevel@tonic-gate extern int acl_getattr2_otw(vnode_t *, vattr_t *, cred_t *);
366*0Sstevel@tonic-gate extern int acl_access2(vnode_t *, int, int, cred_t *);
367*0Sstevel@tonic-gate extern int acl_getxattrdir2(vnode_t *, vnode_t **, bool_t, cred_t *, int);
368*0Sstevel@tonic-gate extern int acl_getacl3(vnode_t *, vsecattr_t *, int, cred_t *);
369*0Sstevel@tonic-gate extern int acl_setacl3(vnode_t *, vsecattr_t *, int, cred_t *);
370*0Sstevel@tonic-gate extern int acl_getxattrdir3(vnode_t *, vnode_t **, bool_t, cred_t *, int);
371*0Sstevel@tonic-gate extern int acl2call(mntinfo_t *, rpcproc_t, xdrproc_t, caddr_t, xdrproc_t,
372*0Sstevel@tonic-gate 			caddr_t, cred_t *, int *, enum nfsstat *, int,
373*0Sstevel@tonic-gate 			failinfo_t *);
374*0Sstevel@tonic-gate extern int acl3call(mntinfo_t *, rpcproc_t, xdrproc_t, caddr_t, xdrproc_t,
375*0Sstevel@tonic-gate 			caddr_t, cred_t *, int *, nfsstat3 *, int,
376*0Sstevel@tonic-gate 			failinfo_t *);
377*0Sstevel@tonic-gate extern void nfs_acl_free(vsecattr_t *);
378*0Sstevel@tonic-gate #endif
379*0Sstevel@tonic-gate 
380*0Sstevel@tonic-gate #ifdef _KERNEL
381*0Sstevel@tonic-gate /* server and client data structures */
382*0Sstevel@tonic-gate extern kstat_named_t	*aclproccnt_v2_ptr;
383*0Sstevel@tonic-gate extern kstat_named_t	*aclproccnt_v3_ptr;
384*0Sstevel@tonic-gate 
385*0Sstevel@tonic-gate extern char		*aclnames_v2[];
386*0Sstevel@tonic-gate extern uchar_t		acl_call_type_v2[];
387*0Sstevel@tonic-gate extern uchar_t		acl_ss_call_type_v2[];
388*0Sstevel@tonic-gate extern uchar_t		acl_timer_type_v2[];
389*0Sstevel@tonic-gate 
390*0Sstevel@tonic-gate extern char		*aclnames_v3[];
391*0Sstevel@tonic-gate extern uchar_t		acl_call_type_v3[];
392*0Sstevel@tonic-gate extern uchar_t		acl_ss_call_type_v3[];
393*0Sstevel@tonic-gate extern uchar_t		acl_timer_type_v3[];
394*0Sstevel@tonic-gate #endif
395*0Sstevel@tonic-gate 
396*0Sstevel@tonic-gate #ifdef	__cplusplus
397*0Sstevel@tonic-gate }
398*0Sstevel@tonic-gate #endif
399*0Sstevel@tonic-gate 
400*0Sstevel@tonic-gate #endif	/* _NFS_NFS_ACL_H */
401