diff options
Diffstat (limited to 'include/linux/nfsd')
-rw-r--r-- | include/linux/nfsd/nfsd.h | 16 | ||||
-rw-r--r-- | include/linux/nfsd/xdr.h | 4 | ||||
-rw-r--r-- | include/linux/nfsd/xdr3.h | 26 |
3 files changed, 46 insertions, 0 deletions
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h index 8f85d9a59607..4bf931d5ff56 100644 --- a/include/linux/nfsd/nfsd.h +++ b/include/linux/nfsd/nfsd.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/unistd.h> | 15 | #include <linux/unistd.h> |
16 | #include <linux/dirent.h> | 16 | #include <linux/dirent.h> |
17 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
18 | #include <linux/posix_acl.h> | ||
18 | #include <linux/mount.h> | 19 | #include <linux/mount.h> |
19 | 20 | ||
20 | #include <linux/nfsd/debug.h> | 21 | #include <linux/nfsd/debug.h> |
@@ -124,6 +125,21 @@ int nfsd_statfs(struct svc_rqst *, struct svc_fh *, | |||
124 | int nfsd_notify_change(struct inode *, struct iattr *); | 125 | int nfsd_notify_change(struct inode *, struct iattr *); |
125 | int nfsd_permission(struct svc_export *, struct dentry *, int); | 126 | int nfsd_permission(struct svc_export *, struct dentry *, int); |
126 | 127 | ||
128 | #if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL) | ||
129 | #ifdef CONFIG_NFSD_V2_ACL | ||
130 | extern struct svc_version nfsd_acl_version2; | ||
131 | #else | ||
132 | #define nfsd_acl_version2 NULL | ||
133 | #endif | ||
134 | #ifdef CONFIG_NFSD_V3_ACL | ||
135 | extern struct svc_version nfsd_acl_version3; | ||
136 | #else | ||
137 | #define nfsd_acl_version3 NULL | ||
138 | #endif | ||
139 | struct posix_acl *nfsd_get_posix_acl(struct svc_fh *, int); | ||
140 | int nfsd_set_posix_acl(struct svc_fh *, int, struct posix_acl *); | ||
141 | #endif | ||
142 | |||
127 | 143 | ||
128 | /* | 144 | /* |
129 | * NFSv4 State | 145 | * NFSv4 State |
diff --git a/include/linux/nfsd/xdr.h b/include/linux/nfsd/xdr.h index ecccef777dae..130d4f588a37 100644 --- a/include/linux/nfsd/xdr.h +++ b/include/linux/nfsd/xdr.h | |||
@@ -169,4 +169,8 @@ int nfssvc_encode_entry(struct readdir_cd *, const char *name, | |||
169 | 169 | ||
170 | int nfssvc_release_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *); | 170 | int nfssvc_release_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *); |
171 | 171 | ||
172 | /* Helper functions for NFSv2 ACL code */ | ||
173 | u32 *nfs2svc_encode_fattr(struct svc_rqst *rqstp, u32 *p, struct svc_fh *fhp); | ||
174 | u32 *nfs2svc_decode_fh(u32 *p, struct svc_fh *fhp); | ||
175 | |||
172 | #endif /* LINUX_NFSD_H */ | 176 | #endif /* LINUX_NFSD_H */ |
diff --git a/include/linux/nfsd/xdr3.h b/include/linux/nfsd/xdr3.h index 0ae9e0ef5f68..21e18ce7ca63 100644 --- a/include/linux/nfsd/xdr3.h +++ b/include/linux/nfsd/xdr3.h | |||
@@ -110,6 +110,19 @@ struct nfsd3_commitargs { | |||
110 | __u32 count; | 110 | __u32 count; |
111 | }; | 111 | }; |
112 | 112 | ||
113 | struct nfsd3_getaclargs { | ||
114 | struct svc_fh fh; | ||
115 | int mask; | ||
116 | }; | ||
117 | |||
118 | struct posix_acl; | ||
119 | struct nfsd3_setaclargs { | ||
120 | struct svc_fh fh; | ||
121 | int mask; | ||
122 | struct posix_acl *acl_access; | ||
123 | struct posix_acl *acl_default; | ||
124 | }; | ||
125 | |||
113 | struct nfsd3_attrstat { | 126 | struct nfsd3_attrstat { |
114 | __u32 status; | 127 | __u32 status; |
115 | struct svc_fh fh; | 128 | struct svc_fh fh; |
@@ -209,6 +222,14 @@ struct nfsd3_commitres { | |||
209 | struct svc_fh fh; | 222 | struct svc_fh fh; |
210 | }; | 223 | }; |
211 | 224 | ||
225 | struct nfsd3_getaclres { | ||
226 | __u32 status; | ||
227 | struct svc_fh fh; | ||
228 | int mask; | ||
229 | struct posix_acl *acl_access; | ||
230 | struct posix_acl *acl_default; | ||
231 | }; | ||
232 | |||
212 | /* dummy type for release */ | 233 | /* dummy type for release */ |
213 | struct nfsd3_fhandle_pair { | 234 | struct nfsd3_fhandle_pair { |
214 | __u32 dummy; | 235 | __u32 dummy; |
@@ -241,6 +262,7 @@ union nfsd3_xdrstore { | |||
241 | struct nfsd3_fsinfores fsinfores; | 262 | struct nfsd3_fsinfores fsinfores; |
242 | struct nfsd3_pathconfres pathconfres; | 263 | struct nfsd3_pathconfres pathconfres; |
243 | struct nfsd3_commitres commitres; | 264 | struct nfsd3_commitres commitres; |
265 | struct nfsd3_getaclres getaclres; | ||
244 | }; | 266 | }; |
245 | 267 | ||
246 | #define NFS3_SVC_XDRSIZE sizeof(union nfsd3_xdrstore) | 268 | #define NFS3_SVC_XDRSIZE sizeof(union nfsd3_xdrstore) |
@@ -316,6 +338,10 @@ int nfs3svc_encode_entry(struct readdir_cd *, const char *name, | |||
316 | int nfs3svc_encode_entry_plus(struct readdir_cd *, const char *name, | 338 | int nfs3svc_encode_entry_plus(struct readdir_cd *, const char *name, |
317 | int namlen, loff_t offset, ino_t ino, | 339 | int namlen, loff_t offset, ino_t ino, |
318 | unsigned int); | 340 | unsigned int); |
341 | /* Helper functions for NFSv3 ACL code */ | ||
342 | u32 *nfs3svc_encode_post_op_attr(struct svc_rqst *rqstp, u32 *p, | ||
343 | struct svc_fh *fhp); | ||
344 | u32 *nfs3svc_decode_fh(u32 *p, struct svc_fh *fhp); | ||
319 | 345 | ||
320 | 346 | ||
321 | #endif /* _LINUX_NFSD_XDR3_H */ | 347 | #endif /* _LINUX_NFSD_XDR3_H */ |