Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Apr 2002 00:20:22 -0400 (EDT)
From:      Garrett Wollman <wollman@lcs.mit.edu>
To:        "M. Warner Losh" <imp@village.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern kern_descrip.c kern_exec.c src/sys/sys filedesc.h
Message-ID:  <200204190420.g3J4KMC69617@khavrinen.lcs.mit.edu>
In-Reply-To: <20020418.220125.06947209.imp@village.org>
References:  <200204190045.g3J0jUY59526@freefall.freebsd.org> <200204190309.g3J39tE69057@khavrinen.lcs.mit.edu> <20020418.220125.06947209.imp@village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Thu, 18 Apr 2002 22:01:25 -0600 (MDT), "M. Warner Losh" <imp@village.org> said:

> There is no other way to fix this than in the kernel...

Sure there is -- make sure that every privileged process has something
on every fd.  You could do it in csu (although from a standards
perspective that would make no difference).  Or, alternatively, rather
than changing exec(), you could change fdalloc() to never return fd 0,
1, or 2 except when explicitly requested by dup2() -- although this
would break some seriously old programs that expect to be able to do

	fd = open(...)
	close(1);
	dup(fd);

and have it work.  (These programs are broken anyway -- the Standard
does not guarantee any particular order of fd allocation.)

-GAWollman


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204190420.g3J4KMC69617>