Re: do_dup patch

Bruce Evans <[email protected]> Tue, 26 Nov 2002 00:10:20 +1100 (EST)
Newsgroups gmane.os.freebsd.devel.audit
Message-ID <[email protected]>
On Mon, 25 Nov 2002, Olivier Houchard wrote:

> On Mon, Nov 25, 2002 at 11:07:53PM +1100, Bruce Evans wrote:
> > %%%
> > Index: kern_descrip.c
> > ===================================================================
> > RCS file: /home/ncvs/src/sys/kern/kern_descrip.c,v
> > retrieving revision 1.168
> > diff -u -2 -r1.168 kern_descrip.c
> > --- kern_descrip.c	27 Oct 2002 18:07:41 -0000	1.168
> > +++ kern_descrip.c	25 Nov 2002 11:56:27 -0000
> > @@ -471,6 +475,6 @@
> >  	 */
> >  	FILEDESC_LOCK(fdp);
> > -	if (old >= fdp->fd_nfiles || fdp->fd_ofiles[old] == NULL ||
> > -	    new >= p->p_rlimit[RLIMIT_NOFILE].rlim_cur ||
> > +	if (old < 0 || old >= fdp->fd_nfiles || fdp->fd_ofiles[old] == NULL ||
> > +	    new < 0 || new >= p->p_rlimit[RLIMIT_NOFILE].rlim_cur ||
> >  	    new >= maxfilesperproc) {
> >  		FILEDESC_UNLOCK(fdp);
> > %%%
>
> I just tested the same change and it is ok.
> Shall I submit it to re@ or will you do it ?

Please do it.

Bruce


To Unsubscribe: send mail to [email protected]
with "unsubscribe freebsd-audit" in the body of the message