xref: /OK3568_Linux_fs/kernel/fs/nfsd/acl.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  *  Common NFSv4 ACL handling definitions.
3*4882a593Smuzhiyun  *
4*4882a593Smuzhiyun  *  Copyright (c) 2002 The Regents of the University of Michigan.
5*4882a593Smuzhiyun  *  All rights reserved.
6*4882a593Smuzhiyun  *
7*4882a593Smuzhiyun  *  Marius Aamodt Eriksen <marius@umich.edu>
8*4882a593Smuzhiyun  *
9*4882a593Smuzhiyun  *  Redistribution and use in source and binary forms, with or without
10*4882a593Smuzhiyun  *  modification, are permitted provided that the following conditions
11*4882a593Smuzhiyun  *  are met:
12*4882a593Smuzhiyun  *
13*4882a593Smuzhiyun  *  1. Redistributions of source code must retain the above copyright
14*4882a593Smuzhiyun  *     notice, this list of conditions and the following disclaimer.
15*4882a593Smuzhiyun  *  2. Redistributions in binary form must reproduce the above copyright
16*4882a593Smuzhiyun  *     notice, this list of conditions and the following disclaimer in the
17*4882a593Smuzhiyun  *     documentation and/or other materials provided with the distribution.
18*4882a593Smuzhiyun  *  3. Neither the name of the University nor the names of its
19*4882a593Smuzhiyun  *     contributors may be used to endorse or promote products derived
20*4882a593Smuzhiyun  *     from this software without specific prior written permission.
21*4882a593Smuzhiyun  *
22*4882a593Smuzhiyun  *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
23*4882a593Smuzhiyun  *  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
24*4882a593Smuzhiyun  *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25*4882a593Smuzhiyun  *  DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26*4882a593Smuzhiyun  *  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27*4882a593Smuzhiyun  *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28*4882a593Smuzhiyun  *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
29*4882a593Smuzhiyun  *  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
30*4882a593Smuzhiyun  *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31*4882a593Smuzhiyun  *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32*4882a593Smuzhiyun  *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33*4882a593Smuzhiyun  */
34*4882a593Smuzhiyun 
35*4882a593Smuzhiyun #ifndef LINUX_NFS4_ACL_H
36*4882a593Smuzhiyun #define LINUX_NFS4_ACL_H
37*4882a593Smuzhiyun 
38*4882a593Smuzhiyun struct nfs4_acl;
39*4882a593Smuzhiyun struct svc_fh;
40*4882a593Smuzhiyun struct svc_rqst;
41*4882a593Smuzhiyun 
42*4882a593Smuzhiyun int nfs4_acl_bytes(int entries);
43*4882a593Smuzhiyun int nfs4_acl_get_whotype(char *, u32);
44*4882a593Smuzhiyun __be32 nfs4_acl_write_who(struct xdr_stream *xdr, int who);
45*4882a593Smuzhiyun 
46*4882a593Smuzhiyun int nfsd4_get_nfs4_acl(struct svc_rqst *rqstp, struct dentry *dentry,
47*4882a593Smuzhiyun 		struct nfs4_acl **acl);
48*4882a593Smuzhiyun __be32 nfsd4_set_nfs4_acl(struct svc_rqst *rqstp, struct svc_fh *fhp,
49*4882a593Smuzhiyun 		struct nfs4_acl *acl);
50*4882a593Smuzhiyun 
51*4882a593Smuzhiyun #endif /* LINUX_NFS4_ACL_H */
52