]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC: r230345
authorrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 3 Feb 2012 03:41:43 +0000 (03:41 +0000)
committerrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 3 Feb 2012 03:41:43 +0000 (03:41 +0000)
commitc6461d9eadaae0db2a1de23cdce162cb8345bd80
treef95f63d1709178f78026b55a7e7f7728aeebf6d1
parent11328b167cc440411b51757ac9f516a5a17e9f77
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.

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