]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC: r230801
authorrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 14 Feb 2012 04:07:35 +0000 (04:07 +0000)
committerrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 14 Feb 2012 04:07:35 +0000 (04:07 +0000)
commit5a1f7846d20bc71b08706f39804de7db8da30de8
treec043561b12deccebd8900b33e4574fc24e8f6279
parent940fbcb95d48fb59e659aa6c1c882ae2da87f181
MFC: r230801
jwd@ reported a problem via email to freebsd-fs@ on Aug 25, 2011
under the subject "F_RDLCK lock to FreeBSD NFS fails to R/O target file".
This occurred because the server side NLM always checked for VWRITE
access, irrespective of the type of lock request. This patch
replaces VOP_ACCESS(..VWRITE..) with one appropriate to
the lock operation. It allows unlock and lock cancellation
to be done without a check of VOP_ACCESS(), so that files
can't be left locked indefinitely after the file permissions
have been changed.

git-svn-id: svn://svn.freebsd.org/base/stable/9@231633 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/nlm/nlm_prot_impl.c