freebsd-dev/sys/fs
Rick Macklem 23b3566364 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:	Martin Cracauer (cracauer at cons.org)
Reviewed by:	jhb
MFC after:	2 weeks
2012-01-20 00:58:51 +00:00
..
cd9660 Make sure all intermediate variables holding mount flags (mnt_flag) 2012-01-17 01:08:01 +00:00
coda Second-to-last commit implementing Capsicum capabilities in the FreeBSD 2011-08-11 12:30:23 +00:00
deadfs Add function vop_rename_fail(9) that performs needed cleanup for locks 2010-04-02 14:03:01 +00:00
devfs Explicitly use curthread while manipulating td_fpop during last close 2011-12-09 17:49:34 +00:00
ext2fs Migrate ufs and ext2fs from skpc() to memcchr(). 2012-01-01 20:47:33 +00:00
fdescfs Make sure all intermediate variables holding mount flags (mnt_flag) 2012-01-17 01:08:01 +00:00
fifofs Initialize fifoinfo fi_wgen field on open. The only important is the 2011-12-04 19:25:49 +00:00
hpfs Make sure all intermediate variables holding mount flags (mnt_flag) 2012-01-17 01:08:01 +00:00
msdosfs Make sure all intermediate variables holding mount flags (mnt_flag) 2012-01-17 01:08:01 +00:00
nfs Martin Cracauer reported a problem to freebsd-current@ under the 2012-01-20 00:58:51 +00:00
nfsclient Make sure all intermediate variables holding mount flags (mnt_flag) 2012-01-17 01:08:01 +00:00
nfsserver Tai Horgan reported via email that there were two places in 2012-01-14 04:04:58 +00:00
ntfs Make sure all intermediate variables holding mount flags (mnt_flag) 2012-01-17 01:08:01 +00:00
nullfs Subject: NULLFS: properly destroy node hash 2012-01-18 11:23:46 +00:00
nwfs Make sure all intermediate variables holding mount flags (mnt_flag) 2012-01-17 01:08:01 +00:00
portalfs Make sure all intermediate variables holding mount flags (mnt_flag) 2012-01-17 01:08:01 +00:00
procfs Abrogate nchr argument in proc_getargv() and proc_getenvv(): we always want 2012-01-15 18:47:24 +00:00
pseudofs Make sure all intermediate variables holding mount flags (mnt_flag) 2012-01-17 01:08:01 +00:00
smbfs Make sure all intermediate variables holding mount flags (mnt_flag) 2012-01-17 01:08:01 +00:00
tmpfs Return EOPNOTSUPP since we only support update mounts for NFS export. 2012-01-17 01:25:53 +00:00
udf Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs. 2011-11-07 06:44:47 +00:00
unionfs Make unionfs also clear VAPPEND when clearing VWRITE, since VAPPEND 2011-10-10 21:32:08 +00:00