SunOS 4.0.3 telnet problems

Ian Donaldson rcodi at koel.co.rmit.oz.au
Tue Feb 27 00:05:52 AEST 1990


medin at cincsac.arc.nasa.gov (Milo S. Medin) writes:

>I don't think your problem is in in.telnetd.  We had the same problem
>here.  It turned out to be /bin/login hanging.   ...

>The cause is that inetd was manually restarted from a shell, and thus
>inherited the environment of it's parent process.  It's this environment
>that causes things to wedge, 

I found this problem under 4.0.3 too, and found that there were at least
two problems.

When I ported 4.3-tahoe version of /bin/login to SunOS 4.0.3 to see what
was going on, I found that the environment was being stomped on.  I did a
"w" and found my encrypted passwd in the output!

The solution was to initialize the variable "envinit" inside "login.c" to
prevent setenv() from stomping randomly on memory.

ie:
	char *envinit[] = {0};

Without this, anything could happen to /bin/login.  It could hang, crash
or anything, and would be influenced by the size of the environment or the
number of arguments it was passwd by its invoker (eg: inetd).  If inetd
was restarted from a shell then this size would differ, producing
different results.

HOWEVER, replacing /bin/login under 4.0.3 didn't cure the telnet problem.
Compiling up a stock 4.3-tahoe telnetd and installing it *did* fix the
problem, instantly.  I reverted to the 4.0.3 /bin/login once telnetd was
replaced and it still worked ok (so far).

(Incidently, it was a Sun 3/80, running 4.0.3 EXPORT)

Ian D



More information about the Comp.sys.sun mailing list