]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC: r230345
authorrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 3 Feb 2012 03:05:41 +0000 (03:05 +0000)
committerrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 3 Feb 2012 03:05:41 +0000 (03:05 +0000)
commitb7800555fa60afa1e45b39723794a16022d012ee
tree0429dd6fad6d2aefea524bd87e209c45fd76434b
parent331f3958c6b96b5e405f2ba2544236b8e4b2059d
MFC: r230345
Martin Cracauer reported a problem to freebsd-current@ under the
subject "Data corruption over NFS in -current". During investigation
of this, I came across an ugly bogusity in the new NFS client where
it replaced the cr_uid with the one used for the mount. This was
done so that "system operations" like the NFSv4 Renew would be
performed as the user that did the mount. However, if any other
thread shares the credential with the one doing this operation,
it could do an RPC (or just about anything else) as the wrong cr_uid.
This patch fixes the above, by using the mount credentials instead of
the one provided as an argument for this case. It appears
to have fixed Martin's problem.
This patch is needed for NFSv4 mounts and NFSv3 mounts against
some non-FreeBSD servers that do not put post operation attributes
in the NFSv3 Statfs RPC reply.

Tested by: cracauer at cons.org, dim

git-svn-id: svn://svn.freebsd.org/base/stable/9@230928 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/fs/nfs/nfs_commonkrpc.c