Date: Wed, 17 Nov 1999 21:53:31 +0800 From: Peter Wemm <peter@netplex.com.au> To: Kelly Yancey <kbyanc@posi.net> Cc: Bill Studenmund <wrstuden@nas.nasa.gov>, freebsd-hackers@FreeBSD.ORG Subject: Re: Portable way to compare struct stat's? Message-ID: <19991117135331.CC1E51C6D@overcee.netplex.com.au> In-Reply-To: Your message of "Tue, 16 Nov 1999 15:40:43 EST." <Pine.BSF.4.05.9911161512530.87356-100000@kronos.alcnet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Kelly Yancey wrote:
[..]
> For the list: while I was checking OpenBSD's kern_descrip.c to see
> whether they zeroed the memory first, I noticed that they had the
> following check that my 3.3-stable system does not:
>
> [ ... ]
> /* Don't let non-root see generation numbers (for NFS security) */
> if (suser(p->p_ucred, &p->p_acflag)) ub.st_gen = 0;
> [ perform copyout ... ]
>
> Is this a legitimate concern or paranoia? I see that we don't bother in
> -current with it either.
We do this too, but elsewhere...
int
vn_stat(vp, sb, p)
{
...
if (suser_xxx(p->p_ucred, 0, 0))
sb->st_gen = 0;
else
sb->st_gen = vap->va_gen;
...
}
Cheers,
-Peter
--
Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991117135331.CC1E51C6D>
