aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@fys.uio.no>2005-01-04 21:38:13 +0100
committerTrond Myklebust <trond.myklebust@fys.uio.no>2005-01-04 21:38:13 +0100
commitf311579820b99bf9eeb0c0cd41e92dbff6014beb (patch)
treefe343e6f26b99e00f67d61f538a04552a82817e8 /fs
parent4c1b47563e8b11c745f520cdaa1aa121078d93f1 (diff)
downloadhistory-f311579820b99bf9eeb0c0cd41e92dbff6014beb.tar.gz
NFSv4: setattr, close and open_downgrade should use the state_owner's
credentials when they are available. Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4proc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 360290ddea8d84..0f2229475ea6e8 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -635,6 +635,8 @@ static int _nfs4_do_setattr(struct nfs_server *server, struct nfs_fattr *fattr,
fattr->valid = 0;
+ if (state != NULL)
+ msg.rpc_cred = state->owner->so_cred;
if (sattr->ia_valid & ATTR_SIZE)
nfs4_copy_stateid(&arg.stateid, state, NULL);
else
@@ -681,6 +683,7 @@ static int _nfs4_do_close(struct inode *inode, struct nfs4_state *state)
.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_CLOSE],
.rpc_argp = &arg,
.rpc_resp = &res,
+ .rpc_cred = sp->so_cred,
};
if (test_bit(NFS_DELEGATED_STATE, &state->flags))
@@ -734,6 +737,7 @@ static int _nfs4_do_downgrade(struct inode *inode, struct nfs4_state *state, mod
.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_OPEN_DOWNGRADE],
.rpc_argp = &arg,
.rpc_resp = &res,
+ .rpc_cred = sp->so_cred,
};
if (test_bit(NFS_DELEGATED_STATE, &state->flags))