]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC: r231133
authorrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 12 Feb 2012 06:41:29 +0000 (06:41 +0000)
committerrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 12 Feb 2012 06:41:29 +0000 (06:41 +0000)
commite2f4648ec101d76b17b421f01464303151185aa3
tree1fac2a8cbec8e11705658c3687aed4957dadcc8c
parentc1daf59b444a9e425e919c0f7b9d15c0a8ee0dbc
MFC: r231133
r228827 fixed a problem where copying of NFSv4 open credentials into
a credential structure would corrupt it. This happened when the
p argument was != NULL. However, I now realize that the copying of
open credentials should only happen for p == NULL, since that indicates
that it is a read-ahead or write-behind. This patch fixes this.
After this commit, r228827 could be reverted, but I think the code is
clearer and safer with the patch, so I am going to leave it in.
Without this patch, it was possible that a NFSv4 VOP_SETATTR() could have
changed the credentials of the caller. This would have happened if
the process doing the VOP_SETATTR() did not have the file open, but
some other process running as a different uid had the file open for writing
at the same time.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231547 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/fs/nfsclient/nfs_clstate.c