bug-inetutils
[Top][All Lists]
Advanced

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

rlogind on Solaris


From: Sergey Poznyakoff
Subject: rlogind on Solaris
Date: Sat, 14 Jul 2001 18:48:55 +0300

Quoting Alain Magloire:
> P.S: Did you not say you had access to Solaris box?
> I'm trying to fix bugs to the server on solaris, they use
> STREAM handling instead of the usual BAD ptys.  But do
> not have a solaris box to actually test.
<..snip..>
> It was the rlogind, actually any r* server seems they pretty
> much the same code.  Joachim was debugging it but I could
> not be of any help(No Solaris machine).  IIRC the problem
> was doing login.
> 
> - Maybe /bin/login was expecting some UTMPX entry.
> - The STREAM handling that I have put in is the culprit
>   see libinetutils/{fork,open}pty.c
> 
> When you contacted rlogind, the server just went away
> or /bin/login refuse to log you.

Finally fixed :^). That was a tough one. The problem actually was
in login_tty(): it used TIOCSCTTY on slave pty, but Solaris lacks
this ioctl. Thus the child rlogind process was unable to set its
controlling tty, /bin/login was receiving EOF immediately upon reading
from its stdin and was bailing out.

Another problem was that "pckt" module was pushed onto the master
side of a pseudo terminal by openpty(), but rlogind was trying
to read from master side using read() call, which does not work,
since by default read() operates in byte-stream mode. It could have
been fixed by using I_SRDOPT ioctl on master fd, but I preferred
to use getmsg() and provide a wrapper for systems which lack it.
The stuff was tested on Solaris/x86 (SunOS 5.7) and GNU/Linux. 

Anyway, rlogind.c is rewritten completely. Hope I'll be able to make a
library out of it for using with other r* servers.

Regards,
Sergey






reply via email to

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