Hello wizards, can some of you help me out on the following:
When you use telnet, telnetd sets up a pseudo terminal before doing
a fork. The child "dups" its descriptors so that stdin. stdout and stderr all
go to the slave side of the pseudo terminal, and then execs /bin/login
which in turn execs your remote shell. The parent (the original telnetd)
goes into a loop and handles I/O from the net and the master side of the pseudo
terminal. Right?
What I don't understand is how input/output from the shell (to/from the slave side of the terminal) ends up going over the socket back to the local telnet?
I thought all communication had to pass through telnetd, but monitoring
this process (with monitor) shows no I/O activity when telnet and the remote
shell is communicating. How can this be ? How is the I/O from the remote
shell mapped onto the network ? I thought it would pass through the normal
sosend()/soreceive() routines, but as far as I can see, it does not?
The book by Stevens gives a good example with rlogin, and from the picture
(side 617) it seems that all communication goes through rlogind. Shouldn't
it be the same setup for telnetd ?
Please email.
Thanks in advance..
--
//// ╪rjan W. Robertsen |e-mail : orjanr@staff.cs.uit.no////
///Dept. of Computer Science, University|Home : +47-83-82897 ///
// of Tromsoe, N-9000 TROMS╪, NORWAY |Phone/Fax: +47-83-44053/44580 //