bug-hurd
[Top][All Lists]
Advanced

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

Re: fakeroot status


From: Roland McGrath
Subject: Re: fakeroot status
Date: Mon, 13 May 2002 17:45:21 -0400 (EDT)

> Mmh, how is this done correctly?  I have implemented the netfs_S_file_exec
> pass-through, which works for suid programs, but not for scripts:
> If the program is a script, the file_exec call will dead lock, because exec
> tries to lock up the file node while it is locked in netfs_S_file_exec. 
> However, if I don't lock the node, I get "/dev/fd/3: Bad file descriptor".
> It might be that not locking is the right thing to do, and the BADFD error
> is a distinct one.

There is no need to lock the node and indeed it is bad to do so, as you
see.  (There is no need to lock because the file port never changes while
the node lives.)  I also fixed it not to use MACH_MSG_TYPE_MOVE_SEND, which
is not safe in any interruptible Hurd RPC.

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).

> There is another problem with fakeroot, and that is chmod.  It doesn't work
> at all :)  I always get EOPNOTSUPP.  

I didn't pay close enough attention to what netfs does (or follow the nfs
example closely), and that comment from netfs.h is not entirely clear on
what the function has to do.  It gets called with no S_IFMT bits set when
not changing.  I fixed fakeroot so it should work right.

> and the files ended up being owned by root in the package, and with correct
> permissions.  So we are getting there! 

Good!



reply via email to

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