blob: 6276ec8608b0674a5bcd9d35a1c271a4816b1613 [file] [log] [blame]
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +00001/*
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +00002 * Process version 2 NFSACL requests.
3 *
4 * Copyright (C) 2002-2003 Andreas Gruenbacher <agruen@suse.de>
5 */
6
Boaz Harrosh9a74af22009-12-03 20:30:56 +02007#include "nfsd.h"
8/* FIXME: nfsacl.h is a broken header */
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +00009#include <linux/nfsacl.h>
Tejun Heo5a0e3ad2010-03-24 17:04:11 +090010#include <linux/gfp.h>
Boaz Harrosh9a74af22009-12-03 20:30:56 +020011#include "cache.h"
12#include "xdr3.h"
J. Bruce Fields0a3adad2009-11-04 18:12:35 -050013#include "vfs.h"
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +000014
15#define NFSDDBG_FACILITY NFSDDBG_PROC
16#define RETURN_STATUS(st) { resp->status = (st); return (st); }
17
18/*
19 * NULL call.
20 */
Al Viro7111c662006-10-19 23:28:45 -070021static __be32
Christoph Hellwiga6beb732017-05-08 17:35:49 +020022nfsacld_proc_null(struct svc_rqst *rqstp)
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +000023{
24 return nfs_ok;
25}
26
27/*
28 * Get the Access and/or Default ACL of a file.
29 */
Christoph Hellwiga6beb732017-05-08 17:35:49 +020030static __be32 nfsacld_proc_getacl(struct svc_rqst *rqstp)
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +000031{
Christoph Hellwiga6beb732017-05-08 17:35:49 +020032 struct nfsd3_getaclargs *argp = rqstp->rq_argp;
33 struct nfsd3_getaclres *resp = rqstp->rq_resp;
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +000034 struct posix_acl *acl;
Christoph Hellwig4ac72492013-12-20 05:16:55 -080035 struct inode *inode;
36 svc_fh *fh;
Al Viroc4d987b2006-10-19 23:29:00 -070037 __be32 nfserr = 0;
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +000038
39 dprintk("nfsd: GETACL(2acl) %s\n", SVCFH_fmt(&argp->fh));
40
41 fh = fh_copy(&resp->fh, &argp->fh);
Miklos Szeredi8837abc2008-06-16 13:20:29 +020042 nfserr = fh_verify(rqstp, &resp->fh, 0, NFSD_MAY_NOP);
43 if (nfserr)
J. Bruce Fieldsac8587d2007-11-12 16:05:02 -050044 RETURN_STATUS(nfserr);
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +000045
David Howells2b0143b2015-03-17 22:25:59 +000046 inode = d_inode(fh->fh_dentry);
Christoph Hellwig4ac72492013-12-20 05:16:55 -080047
Kinglong Mee7b8f4582015-07-03 19:39:02 +080048 if (argp->mask & ~NFS_ACL_MASK)
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +000049 RETURN_STATUS(nfserr_inval);
50 resp->mask = argp->mask;
51
J. Bruce Fields4f4a4fa2013-02-01 15:13:04 -050052 nfserr = fh_getattr(fh, &resp->stat);
53 if (nfserr)
Kinglong Mee7b8f4582015-07-03 19:39:02 +080054 RETURN_STATUS(nfserr);
J. Bruce Fields4f4a4fa2013-02-01 15:13:04 -050055
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +000056 if (resp->mask & (NFS_ACL|NFS_ACLCNT)) {
Christoph Hellwig4ac72492013-12-20 05:16:55 -080057 acl = get_acl(inode, ACL_TYPE_ACCESS);
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +000058 if (acl == NULL) {
59 /* Solaris returns the inode's minimum ACL. */
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +000060 acl = posix_acl_from_mode(inode->i_mode, GFP_KERNEL);
61 }
Kinglong Mee35e634b2014-07-09 21:54:16 +080062 if (IS_ERR(acl)) {
63 nfserr = nfserrno(PTR_ERR(acl));
64 goto fail;
65 }
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +000066 resp->acl_access = acl;
67 }
68 if (resp->mask & (NFS_DFACL|NFS_DFACLCNT)) {
69 /* Check how Solaris handles requests for the Default ACL
70 of a non-directory! */
Christoph Hellwig4ac72492013-12-20 05:16:55 -080071 acl = get_acl(inode, ACL_TYPE_DEFAULT);
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +000072 if (IS_ERR(acl)) {
Christoph Hellwig4ac72492013-12-20 05:16:55 -080073 nfserr = nfserrno(PTR_ERR(acl));
74 goto fail;
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +000075 }
76 resp->acl_default = acl;
77 }
78
79 /* resp->acl_{access,default} are released in nfssvc_release_getacl. */
80 RETURN_STATUS(0);
81
82fail:
83 posix_acl_release(resp->acl_access);
84 posix_acl_release(resp->acl_default);
85 RETURN_STATUS(nfserr);
86}
87
88/*
89 * Set the Access and/or Default ACL of a file.
90 */
Christoph Hellwiga6beb732017-05-08 17:35:49 +020091static __be32 nfsacld_proc_setacl(struct svc_rqst *rqstp)
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +000092{
Christoph Hellwiga6beb732017-05-08 17:35:49 +020093 struct nfsd3_setaclargs *argp = rqstp->rq_argp;
94 struct nfsd_attrstat *resp = rqstp->rq_resp;
Christoph Hellwig4ac72492013-12-20 05:16:55 -080095 struct inode *inode;
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +000096 svc_fh *fh;
Al Viroc4d987b2006-10-19 23:29:00 -070097 __be32 nfserr = 0;
Christoph Hellwig4ac72492013-12-20 05:16:55 -080098 int error;
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +000099
100 dprintk("nfsd: SETACL(2acl) %s\n", SVCFH_fmt(&argp->fh));
101
102 fh = fh_copy(&resp->fh, &argp->fh);
Miklos Szeredi8837abc2008-06-16 13:20:29 +0200103 nfserr = fh_verify(rqstp, &resp->fh, 0, NFSD_MAY_SATTR);
Christoph Hellwig4ac72492013-12-20 05:16:55 -0800104 if (nfserr)
105 goto out;
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000106
David Howells2b0143b2015-03-17 22:25:59 +0000107 inode = d_inode(fh->fh_dentry);
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000108
Christoph Hellwig4ac72492013-12-20 05:16:55 -0800109 error = fh_want_write(fh);
110 if (error)
111 goto out_errno;
112
Ben Hutchings99965372016-06-22 19:43:35 +0100113 fh_lock(fh);
114
115 error = set_posix_acl(inode, ACL_TYPE_ACCESS, argp->acl_access);
Christoph Hellwig4ac72492013-12-20 05:16:55 -0800116 if (error)
Ben Hutchings99965372016-06-22 19:43:35 +0100117 goto out_drop_lock;
118 error = set_posix_acl(inode, ACL_TYPE_DEFAULT, argp->acl_default);
Christoph Hellwig4ac72492013-12-20 05:16:55 -0800119 if (error)
Ben Hutchings99965372016-06-22 19:43:35 +0100120 goto out_drop_lock;
121
122 fh_unlock(fh);
Christoph Hellwig4ac72492013-12-20 05:16:55 -0800123
124 fh_drop_write(fh);
125
126 nfserr = fh_getattr(fh, &resp->stat);
127
128out:
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000129 /* argp->acl_{access,default} may have been allocated in
130 nfssvc_decode_setaclargs. */
131 posix_acl_release(argp->acl_access);
132 posix_acl_release(argp->acl_default);
133 return nfserr;
Ben Hutchings99965372016-06-22 19:43:35 +0100134out_drop_lock:
135 fh_unlock(fh);
Christoph Hellwig4ac72492013-12-20 05:16:55 -0800136 fh_drop_write(fh);
137out_errno:
138 nfserr = nfserrno(error);
139 goto out;
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000140}
141
142/*
143 * Check file attributes
144 */
Christoph Hellwiga6beb732017-05-08 17:35:49 +0200145static __be32 nfsacld_proc_getattr(struct svc_rqst *rqstp)
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000146{
Christoph Hellwiga6beb732017-05-08 17:35:49 +0200147 struct nfsd_fhandle *argp = rqstp->rq_argp;
148 struct nfsd_attrstat *resp = rqstp->rq_resp;
J. Bruce Fields4f4a4fa2013-02-01 15:13:04 -0500149 __be32 nfserr;
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000150 dprintk("nfsd: GETATTR %s\n", SVCFH_fmt(&argp->fh));
151
152 fh_copy(&resp->fh, &argp->fh);
J. Bruce Fields4f4a4fa2013-02-01 15:13:04 -0500153 nfserr = fh_verify(rqstp, &resp->fh, 0, NFSD_MAY_NOP);
154 if (nfserr)
155 return nfserr;
156 nfserr = fh_getattr(&resp->fh, &resp->stat);
157 return nfserr;
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000158}
159
160/*
161 * Check file access
162 */
Christoph Hellwiga6beb732017-05-08 17:35:49 +0200163static __be32 nfsacld_proc_access(struct svc_rqst *rqstp)
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000164{
Christoph Hellwiga6beb732017-05-08 17:35:49 +0200165 struct nfsd3_accessargs *argp = rqstp->rq_argp;
166 struct nfsd3_accessres *resp = rqstp->rq_resp;
Al Viroc4d987b2006-10-19 23:29:00 -0700167 __be32 nfserr;
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000168
169 dprintk("nfsd: ACCESS(2acl) %s 0x%x\n",
170 SVCFH_fmt(&argp->fh),
171 argp->access);
172
173 fh_copy(&resp->fh, &argp->fh);
174 resp->access = argp->access;
175 nfserr = nfsd_access(rqstp, &resp->fh, &resp->access, NULL);
J. Bruce Fields4f4a4fa2013-02-01 15:13:04 -0500176 if (nfserr)
177 return nfserr;
178 nfserr = fh_getattr(&resp->fh, &resp->stat);
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000179 return nfserr;
180}
181
182/*
183 * XDR decode functions
184 */
Christoph Hellwig026fec72017-05-08 19:01:48 +0200185static int nfsaclsvc_decode_getaclargs(struct svc_rqst *rqstp, __be32 *p)
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000186{
Christoph Hellwig026fec72017-05-08 19:01:48 +0200187 struct nfsd3_getaclargs *argp = rqstp->rq_argp;
188
Benoit Tained40aa332014-05-22 16:32:30 +0200189 p = nfs2svc_decode_fh(p, &argp->fh);
190 if (!p)
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000191 return 0;
192 argp->mask = ntohl(*p); p++;
193
194 return xdr_argsize_check(rqstp, p);
195}
196
197
Christoph Hellwig026fec72017-05-08 19:01:48 +0200198static int nfsaclsvc_decode_setaclargs(struct svc_rqst *rqstp, __be32 *p)
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000199{
Christoph Hellwig026fec72017-05-08 19:01:48 +0200200 struct nfsd3_setaclargs *argp = rqstp->rq_argp;
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000201 struct kvec *head = rqstp->rq_arg.head;
202 unsigned int base;
203 int n;
204
Benoit Tained40aa332014-05-22 16:32:30 +0200205 p = nfs2svc_decode_fh(p, &argp->fh);
206 if (!p)
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000207 return 0;
208 argp->mask = ntohl(*p++);
Kinglong Mee7b8f4582015-07-03 19:39:02 +0800209 if (argp->mask & ~NFS_ACL_MASK ||
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000210 !xdr_argsize_check(rqstp, p))
211 return 0;
212
213 base = (char *)p - (char *)head->iov_base;
214 n = nfsacl_decode(&rqstp->rq_arg, base, NULL,
215 (argp->mask & NFS_ACL) ?
216 &argp->acl_access : NULL);
217 if (n > 0)
218 n = nfsacl_decode(&rqstp->rq_arg, base + n, NULL,
219 (argp->mask & NFS_DFACL) ?
220 &argp->acl_default : NULL);
221 return (n > 0);
222}
223
Christoph Hellwig026fec72017-05-08 19:01:48 +0200224static int nfsaclsvc_decode_fhandleargs(struct svc_rqst *rqstp, __be32 *p)
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000225{
Christoph Hellwig026fec72017-05-08 19:01:48 +0200226 struct nfsd_fhandle *argp = rqstp->rq_argp;
227
Benoit Tained40aa332014-05-22 16:32:30 +0200228 p = nfs2svc_decode_fh(p, &argp->fh);
229 if (!p)
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000230 return 0;
231 return xdr_argsize_check(rqstp, p);
232}
233
Christoph Hellwig026fec72017-05-08 19:01:48 +0200234static int nfsaclsvc_decode_accessargs(struct svc_rqst *rqstp, __be32 *p)
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000235{
Christoph Hellwig026fec72017-05-08 19:01:48 +0200236 struct nfsd3_accessargs *argp = rqstp->rq_argp;
237
Benoit Tained40aa332014-05-22 16:32:30 +0200238 p = nfs2svc_decode_fh(p, &argp->fh);
239 if (!p)
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000240 return 0;
241 argp->access = ntohl(*p++);
242
243 return xdr_argsize_check(rqstp, p);
244}
245
246/*
247 * XDR encode functions
248 */
249
Peter Staubach1b7e0402009-11-02 16:59:07 -0500250/*
251 * There must be an encoding function for void results so svc_process
252 * will work properly.
253 */
Christoph Hellwig63f8de32017-05-08 19:42:02 +0200254static int nfsaclsvc_encode_voidres(struct svc_rqst *rqstp, __be32 *p)
Peter Staubach1b7e0402009-11-02 16:59:07 -0500255{
256 return xdr_ressize_check(rqstp, p);
257}
258
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000259/* GETACL */
Christoph Hellwig63f8de32017-05-08 19:42:02 +0200260static int nfsaclsvc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p)
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000261{
Christoph Hellwig63f8de32017-05-08 19:42:02 +0200262 struct nfsd3_getaclres *resp = rqstp->rq_resp;
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000263 struct dentry *dentry = resp->fh.fh_dentry;
Prasad Paefa89d2007-10-24 15:14:32 -0500264 struct inode *inode;
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000265 struct kvec *head = rqstp->rq_res.head;
266 unsigned int base;
267 int n;
Jesper Juhlcb65a5b2006-12-08 02:39:39 -0800268 int w;
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000269
Prasad Paefa89d2007-10-24 15:14:32 -0500270 /*
271 * Since this is version 2, the check for nfserr in
272 * nfsd_dispatch actually ensures the following cannot happen.
273 * However, it seems fragile to depend on that.
274 */
David Howells2b0143b2015-03-17 22:25:59 +0000275 if (dentry == NULL || d_really_is_negative(dentry))
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000276 return 0;
David Howells2b0143b2015-03-17 22:25:59 +0000277 inode = d_inode(dentry);
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000278
J. Bruce Fields4f4a4fa2013-02-01 15:13:04 -0500279 p = nfs2svc_encode_fattr(rqstp, p, &resp->fh, &resp->stat);
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000280 *p++ = htonl(resp->mask);
281 if (!xdr_ressize_check(rqstp, p))
282 return 0;
283 base = (char *)p - (char *)head->iov_base;
284
Jesper Juhlcb65a5b2006-12-08 02:39:39 -0800285 rqstp->rq_res.page_len = w = nfsacl_size(
286 (resp->mask & NFS_ACL) ? resp->acl_access : NULL,
287 (resp->mask & NFS_DFACL) ? resp->acl_default : NULL);
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000288 while (w > 0) {
J. Bruce Fieldsafc59402012-12-10 18:01:37 -0500289 if (!*(rqstp->rq_next_page++))
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000290 return 0;
291 w -= PAGE_SIZE;
292 }
293
294 n = nfsacl_encode(&rqstp->rq_res, base, inode,
295 resp->acl_access,
296 resp->mask & NFS_ACL, 0);
297 if (n > 0)
298 n = nfsacl_encode(&rqstp->rq_res, base + n, inode,
299 resp->acl_default,
300 resp->mask & NFS_DFACL,
301 NFS_ACL_DEFAULT);
Kinglong Mee7b8f4582015-07-03 19:39:02 +0800302 return (n > 0);
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000303}
304
Christoph Hellwig63f8de32017-05-08 19:42:02 +0200305static int nfsaclsvc_encode_attrstatres(struct svc_rqst *rqstp, __be32 *p)
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000306{
Christoph Hellwig63f8de32017-05-08 19:42:02 +0200307 struct nfsd_attrstat *resp = rqstp->rq_resp;
308
J. Bruce Fields4f4a4fa2013-02-01 15:13:04 -0500309 p = nfs2svc_encode_fattr(rqstp, p, &resp->fh, &resp->stat);
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000310 return xdr_ressize_check(rqstp, p);
311}
312
313/* ACCESS */
Christoph Hellwig63f8de32017-05-08 19:42:02 +0200314static int nfsaclsvc_encode_accessres(struct svc_rqst *rqstp, __be32 *p)
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000315{
Christoph Hellwig63f8de32017-05-08 19:42:02 +0200316 struct nfsd3_accessres *resp = rqstp->rq_resp;
317
J. Bruce Fields4f4a4fa2013-02-01 15:13:04 -0500318 p = nfs2svc_encode_fattr(rqstp, p, &resp->fh, &resp->stat);
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000319 *p++ = htonl(resp->access);
320 return xdr_ressize_check(rqstp, p);
321}
322
323/*
324 * XDR release functions
325 */
Christoph Hellwig85374882017-05-08 18:48:24 +0200326static void nfsaclsvc_release_getacl(struct svc_rqst *rqstp)
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000327{
Christoph Hellwig85374882017-05-08 18:48:24 +0200328 struct nfsd3_getaclres *resp = rqstp->rq_resp;
329
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000330 fh_put(&resp->fh);
331 posix_acl_release(resp->acl_access);
332 posix_acl_release(resp->acl_default);
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000333}
334
Christoph Hellwig85374882017-05-08 18:48:24 +0200335static void nfsaclsvc_release_attrstat(struct svc_rqst *rqstp)
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000336{
Christoph Hellwig85374882017-05-08 18:48:24 +0200337 struct nfsd_attrstat *resp = rqstp->rq_resp;
338
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000339 fh_put(&resp->fh);
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000340}
341
Christoph Hellwig85374882017-05-08 18:48:24 +0200342static void nfsaclsvc_release_access(struct svc_rqst *rqstp)
Greg Banksc9ce2282007-02-20 10:12:34 +1100343{
Christoph Hellwig85374882017-05-08 18:48:24 +0200344 struct nfsd3_accessres *resp = rqstp->rq_resp;
345
346 fh_put(&resp->fh);
Greg Banksc9ce2282007-02-20 10:12:34 +1100347}
348
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000349#define nfsaclsvc_decode_voidargs NULL
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000350#define nfsaclsvc_release_void NULL
351#define nfsd3_fhandleargs nfsd_fhandle
352#define nfsd3_attrstatres nfsd_attrstat
353#define nfsd3_voidres nfsd3_voidargs
354struct nfsd3_voidargs { int dummy; };
355
Christoph Hellwigf7235b62017-05-08 17:59:13 +0200356#define PROC(name, argt, rest, relt, cache, respsize) \
357{ \
Christoph Hellwiga6beb732017-05-08 17:35:49 +0200358 .pc_func = nfsacld_proc_##name, \
Christoph Hellwig026fec72017-05-08 19:01:48 +0200359 .pc_decode = nfsaclsvc_decode_##argt##args, \
Christoph Hellwig63f8de32017-05-08 19:42:02 +0200360 .pc_encode = nfsaclsvc_encode_##rest##res, \
Christoph Hellwig85374882017-05-08 18:48:24 +0200361 .pc_release = nfsaclsvc_release_##relt, \
Christoph Hellwigf7235b62017-05-08 17:59:13 +0200362 .pc_argsize = sizeof(struct nfsd3_##argt##args), \
363 .pc_ressize = sizeof(struct nfsd3_##rest##res), \
364 .pc_cachetype = cache, \
365 .pc_xdrressize = respsize, \
366}
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000367
368#define ST 1 /* status*/
369#define AT 21 /* attributes */
370#define pAT (1+AT) /* post attributes - conditional */
371#define ACL (1+NFS_ACL_MAX_ENTRIES*3) /* Access Control List */
372
Christoph Hellwig860bda22017-05-12 16:11:49 +0200373static const struct svc_procedure nfsd_acl_procedures2[] = {
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000374 PROC(null, void, void, void, RC_NOCACHE, ST),
375 PROC(getacl, getacl, getacl, getacl, RC_NOCACHE, ST+1+2*(1+ACL)),
Greg Banksc9ce2282007-02-20 10:12:34 +1100376 PROC(setacl, setacl, attrstat, attrstat, RC_NOCACHE, ST+AT),
377 PROC(getattr, fhandle, attrstat, attrstat, RC_NOCACHE, ST+AT),
378 PROC(access, access, access, access, RC_NOCACHE, ST+AT+1),
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000379};
380
Christoph Hellwig7fd38af2017-05-08 23:40:27 +0200381static unsigned int nfsd_acl_count2[ARRAY_SIZE(nfsd_acl_procedures2)];
Christoph Hellwige9679182017-05-12 16:21:37 +0200382const struct svc_version nfsd_acl_version2 = {
383 .vs_vers = 2,
384 .vs_nproc = 5,
385 .vs_proc = nfsd_acl_procedures2,
386 .vs_count = nfsd_acl_count2,
387 .vs_dispatch = nfsd_dispatch,
388 .vs_xdrsize = NFS3_SVC_XDRSIZE,
Andreas Gruenbachera257cdd2005-06-22 17:16:26 +0000389};