summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@fys.uio.no>2002-07-26 00:00:40 -0700
committerLinus Torvalds <torvalds@penguin.transmeta.com>2002-07-26 00:00:40 -0700
commitbea92fd5b343aec2b7e3b3637e3651709dd226ca (patch)
tree2a6c66378f56c07ec5f37cf58167feb98496a17b /include/linux
parent3322b8ec16e96bbefae878963882bd4cccdc004b (diff)
[PATCH] add proper NFSv3 permissions checking.
Add full support for the NFSv3 permissions checking. Ensures that we work properly with NFSv3 servers that do uid/gid mapping and/or have support for ACLs. Permissions are cached in the struct nfs_inode in order to reduce the number of RPC calls. The cache timeout period is given by the ordinary attribute timeout.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nfs_fs.h12
-rw-r--r--include/linux/nfs_xdr.h2
2 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index f45c35f298e6..02ef81aee197 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -90,6 +90,16 @@
#ifdef __KERNEL__
/*
+ * NFSv3 Access mode cache
+ */
+struct nfs_access_cache {
+ unsigned long jiffies;
+ struct rpc_cred * cred;
+ int mask;
+ int err;
+};
+
+/*
* nfs fs inode data in memory
*/
struct nfs_inode {
@@ -138,6 +148,8 @@ struct nfs_inode {
*/
unsigned long cache_mtime_jiffies;
+ struct nfs_access_cache cache_access;
+
/*
* This is the cookie verifier used for NFSv3 readdir
* operations
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 110e5b661b58..53ec9c0b94d0 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -300,7 +300,7 @@ struct nfs_rpc_ops {
struct iattr *);
int (*lookup) (struct inode *, struct qstr *,
struct nfs_fh *, struct nfs_fattr *);
- int (*access) (struct inode *, int , int);
+ int (*access) (struct inode *, struct rpc_cred *, int);
int (*readlink)(struct inode *, struct page *);
int (*read) (struct inode *, struct rpc_cred *,
struct nfs_fattr *,