mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
Fix (I hope) the NFS hole. This is only compile tested.
Submitted by: (partly) davids@SECNET.COM via BUGTRAQ
This commit is contained in:
parent
e42337987f
commit
324d42ad57
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=23474
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user