debugging rshd

Mike Ayers
Mon Nov 6 14:59:00 GMT 2000

> From: Corinna Vinschen
> Mike Ayers wrote:
> >     I'm having trouble with rshd and I'd like to debug the problem.
> > Before I go delving into inetd.c, could someone perhaps 
> tell me how to
> > start in.rshd under gdb?  I tried setting up inetd.conf as:
> > 
> > shell   stream   tcp   nowait   root   /usr/bin/gdb
> > /usr/local/libexec/in.rshd -L
> You will have no luck that way. rshd expects the already opened
> connection on stdin/stdout/stderr. This is what inetd does for it's
> child processes. rshd isn't intended as a stand-alone daemon.

    So should I build and install all of inetutils with -g?  Then how
would I proceed?  Can gdb debug a service?

> On the other hand: What problems do you encounter? Are you using
> the latest version (1.3.2-8)? It contains a fix for rshd which avoids
> a possible crash on startup.

    I am using 1.3.2-8, but have had the same problem with 1.3.2-7 and
whatever is current (nonexperimental), if that is different.  Whenever
I try to rcp using the cygwin machine as server, I get:

rcp:  lost connection

    ....but no hint of an error from the server (i.e. the application
log shows only that the rcp started).  I can get no other information,
which is why I want to do this in debug mode.

> >     ...specifically, "<server_path> <args>" appears to get
> > "/usr/sbin/in.rshd in.rshd -L", which seems more like
> > <server_name> <args>" to me.  
> That's the same. `args' begins counting with 0.

    In other words, list everything that will be in argv[], as opposed
to just additional flags.  It might be good to put that in the comments
in inetd.conf, since it is an easy mistake to make.


Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one Place.

Want to unsubscribe from this list?
Send a message to

More information about the Cygwin mailing list