diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-06-11 03:39:41 +0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-07-09 20:09:14 +0400 |
commit | 659bfcd6dd88919a5ad453f62afbeffcb3106847 (patch) | |
tree | e3996d809e9ae4860a8adac71474e6ea8850c3b5 /fs/nfs/proc.c | |
parent | a486aeda9b2b0d944aecce7871b3186379b898de (diff) | |
download | linux-659bfcd6dd88919a5ad453f62afbeffcb3106847.tar.xz |
NFS: Fix the ftruncate() credential problem
ftruncate() access checking is supposed to be performed at open() time,
just like reads and writes.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/proc.c')
-rw-r--r-- | fs/nfs/proc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c index 5c35b02857f3..c7605587d0eb 100644 --- a/fs/nfs/proc.c +++ b/fs/nfs/proc.c @@ -129,6 +129,8 @@ nfs_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, sattr->ia_mode &= S_IALLUGO; dprintk("NFS call setattr\n"); + if (sattr->ia_valid & ATTR_FILE) + msg.rpc_cred = nfs_file_cred(sattr->ia_file); nfs_fattr_init(fattr); status = rpc_call_sync(NFS_CLIENT(inode), &msg, 0); if (status == 0) |