From owner-freebsd-hackers Wed Nov 17 5:53:55 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from overcee.netplex.com.au (overcee.netplex.com.au [202.12.86.7]) by hub.freebsd.org (Postfix) with ESMTP id 7053014D3B for ; Wed, 17 Nov 1999 05:53:34 -0800 (PST) (envelope-from peter@netplex.com.au) Received: from netplex.com.au (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id CC1E51C6D; Wed, 17 Nov 1999 21:53:31 +0800 (WST) (envelope-from peter@netplex.com.au) X-Mailer: exmh version 2.0.2 2/24/98 To: Kelly Yancey Cc: Bill Studenmund , freebsd-hackers@FreeBSD.ORG Subject: Re: Portable way to compare struct stat's? In-reply-to: Your message of "Tue, 16 Nov 1999 15:40:43 EST." Date: Wed, 17 Nov 1999 21:53:31 +0800 From: Peter Wemm Message-Id: <19991117135331.CC1E51C6D@overcee.netplex.com.au> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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