Fix (I hope) the NFS hole. This is only compile tested.

Submitted by:	(partly) davids@SECNET.COM via BUGTRAQ
This commit is contained in:
Gary Palmer 1997-03-07 07:42:41 +00:00
parent e42337987f
commit 324d42ad57
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=23474

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_vnops.c 8.2 (Berkeley) 1/21/94
* $Id$
* $Id: vfs_vnops.c,v 1.30 1997/02/22 09:39:36 peter Exp $
*/
#include <sys/param.h>
@ -411,7 +411,12 @@ vn_stat(vp, sb, p)
sb->st_ctimespec = vap->va_ctime;
sb->st_blksize = vap->va_blocksize;
sb->st_flags = vap->va_flags;
sb->st_gen = vap->va_gen;
if (suser (p->p_cred->pc_ucred, &p->p_acflag)) {
sb->st_gen = 0;
} else {
sb->st_gen = vap->va_gen;
}
#if (S_BLKSIZE == 512)
/* Optimize this case */
sb->st_blocks = vap->va_bytes >> 9;