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

Bug#2011: very silly messages from rsh



>>>>> "Peter" == Peter Tobias <tobias@server.et-inf.fho-emden.de> writes:

    Peter> Ian Jackson wrote:
    >> [...]
    >> -chiark:~/mail> rsh myrddin -l ijackson echo hi
    >> myrddin.chu.cam.ac.uk: Address already in use

    Peter> That's a bug in libc (just like the "unknown server error" for non
    Peter> existing hosts). The same source works with older libraries. I'll
    Peter> reassign the bug to libc.

Investigation with tcpdump shows, that rshd's error message never shows
up. The rcmd function doesn't check for this protocol error but prints the last
errno which has been left over from finding a port number.

Seems like there are 2 bugs: rcmd should handle premature EOF as a protocol
error and error messages written to the socket are discarded when rshd exits.

Since I am not much of a network guru I'd appreciate some help here.

rcmd.c sources are included with libc inet/rcmd.c as well as with netstd in
rshd/rcmd.c. Which one should we consider authorative?

    >> -chiark:~/mail> rsh myrddin -l iwj10 echo hi
    >> hi
    >> -chiark:~/mail> rsh myrddin -l root echo hi
    >> Permission denied.

    Peter> That's correct, the rshd won't allow root logins.

    >> -chiark:~/mail> rsh myrddin -l nonexistent echo hi
    >> myrddin.chu.cam.ac.uk: Address already in use
    >> -chiark:~/mail> rsh myrddin -l iwj10 dpkg -l '"net*"'
    >> myrddin.chu.cam.ac.uk: Address already in use

    Peter> As you already said, it's the getopt bug + another libc4 bug.

Would you please enlighten me, I can't see how a getopt bug is involved here:

~$ rsh beck -l elke pwd
/home/elke
~$ rsh -l elke beck pwd
/home/elke
~$ rsh -l nonexistent beck pwd
beck: Address already in use
~$ rsh beck -l nonexistent pwd


Reply to: