Re: strange limitation on rcmd()

2006-07-10 Thread Mikhail Teterin
понеділок 10 липень 2006 13:50, Brian Candler написав: > Well, it's probably worth send-pr'ing it. The rcmdsh() is taken from OpenBSD, I think, and has no room for the stderr. One would need to reimplement something like rcmdsh2() first :-) > I'd first test whether rsh itself forwards stderr pro

Re: strange limitation on rcmd()

2006-07-10 Thread Brian Candler
On Mon, Jul 10, 2006 at 11:47:33AM -0400, Mikhail Teterin wrote: > What I remain upset about, though, is that the rcmdsh(), which is used by > rcmd() ignores the fd2p parameter making it impossible to capture the > remote's stderr... Well, it's probably worth send-pr'ing it. I'd first test whet

Re: strange limitation on rcmd()

2006-07-10 Thread Mikhail Teterin
On Monday 10 July 2006 10:17, Simon L. Nielsen wrote: = Actually it is, but it would obviously be a stupid idea to do so any = place where privileged ports are required... It would be. But where they are NOT required, it is stupid to check the geteuid() inside the client's rcmd :-) Thank you ver

Re: strange limitation on rcmd()

2006-07-10 Thread Simon L. Nielsen
On 2006.07.10 16:07:06 +0200, Iang wrote: > Brian Candler wrote: > > >Note that only root can bind to reserved ports. > > ... > > >This mechanism is only valid for trusted hosts, of course. If you allow a > >random person to put their own PC on the network, they can of course send > >packets fro

Re: strange limitation on rcmd()

2006-07-10 Thread Iang
Brian Candler wrote: Note that only root can bind to reserved ports. ... This mechanism is only valid for trusted hosts, of course. If you allow a random person to put their own PC on the network, they can of course send packets from privileged ports (either by installing Unix with their own

Re: strange limitation on rcmd()

2006-07-08 Thread Brian Candler
On Fri, Jul 07, 2006 at 08:30:01PM -0400, Mikhail Teterin wrote: > The manual page says, that rcmd() is only to be used by root's processes. DESCRIPTION The rcmd() function is used by the super-user to execute a command on a remote machine using an authentication scheme based on reserved

strange limitation on rcmd()

2006-07-07 Thread Mikhail Teterin
The manual page says, that rcmd() is only to be used by root's processes. On other OSes (Solaris, AIX), trying to call rcmd() without being root simply fails. FreeBSD, however, tries to be helpful and invokes rcmdsh in this case, which is inefficient and leaves the stderr's filedescriptor (fd2p