[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fakeroot status

From: Marcus Brinkmann
Subject: Re: fakeroot status
Date: Wed, 15 May 2002 02:48:31 +0200
User-agent: Mutt/1.3.28i

On Mon, May 13, 2002 at 05:45:21PM -0400, Roland McGrath wrote:
[me wrote]
> > However, if I don't lock the node, I get "/dev/fd/3: Bad file descriptor".
> Please investigate the latter problem.  Firstly, (assuming non-suid
> scripts) it should find a name instead of using the /dev/fd kludge unless
> argv[0] has a stupid value.  But even with that broken, the /dev/fd/3 ought
> to work (unless the script itself closes the descriptor before using it or
> something).

I don't get it.  I have verified that exec correctly increases the dtable
size from 3 to 4, and adds the file port to it.  I set a breakpoint at
S_exec_exec, and first it is hit executing "bashbug" with dtablesize 3, and then
it is hit executing /bin/sh /dev/fd/3 with dtablesize being 4, and dtable[0]
- dtable[3] look reasonable.

OTOH, I don't quite understand that code.  For example, I don't see where
exactly the (new) file descriptors are added to the new task.  However, I
verified that the /dev/fd/3 mechanism works in a non-fakeroot environment.


`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]