Veractiy and FreeBSD
Garrett Wollman
wollman at khavrinen.lcs.mit.edu
Wed Nov 5 09:41:57 PST 2003
<<On Wed, 05 Nov 2003 11:58:21 +1030, Kim Needham <kim.needham at rocksoft.com> said:
> This is caused by a check that determines if the /proc filesystem is on
> the same device as the file being read to prevent reading in files of
> infinite length.
The correct way to perform this check is to call fstatfs() on the file
descriptor and examine f_fstypename[] to see what it is. You probably
shouldn't look explicitly at the type name; use getvfsbyname() on the
type name; if (vfc_flags & VFCF_SYNTHETIC) then the contents of the
file system are generated by the kernel.
-GAWollman
More information about the freebsd-security
mailing list