I have a modified version of rsh here:

ftp://saf.bio.caltech.edu/pub/software/linux_or_unix_tools/rsh.c

based on inetutils 1.4.2.  It added the ability to do:

 rsh target1,target2,target3 command

but I had found that this only worked for root (even though
the binary was suid root).  For any other user only the first
command worked.  For the second and subsequent calls to rcmd()
this was emitted:

 rcmd: socket: Permission denied

After much experimentation I discovered that the lines 

  seteuid (uid);
  setuid (uid);

which are located at lines 609/610 in my modified variant and at
428/429 in the original code were to blame.  Apparently if these
are called it breaks subsequent rcmd() calls.  On further
experimentation I found that rsh worked without these. What is
their purpose???

On an unrelated note, the -l switch on rsh seems to work just
fine when directed to a Solaris rshd, but it doesn't work
when directed to the rshd on Mandrake 10.0.  This is from
the package: rsh-server-0.17-13mdk
The process attempting the rsh -l just hangs.  For what it's
worth the matching rsh from rsh-0.17-13mdk also hangs.  Any
thoughts on what might be causing that?

Regards,

David Mathog
[EMAIL PROTECTED]
Manager, Sequence Analysis Facility, Biology Division, Caltech


_______________________________________________
Bug-inetutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-inetutils

Reply via email to