home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / question / 13579 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  1.6 KB

  1. Path: sparky!uunet!mcsun!sunic!dkuug!uts!fekoprt
  2. From: fekoprt@uts.uni-c.dk (FEK print)
  3. Newsgroups: comp.unix.questions
  4. Subject: Can telnetd preserve environment ? Can I get one that does ?
  5. Keywords: telnetd, environ
  6. Message-ID: <1992Nov18.191831.12729@uts.uni-c.dk>
  7. Date: 18 Nov 92 19:18:31 GMT
  8. Organization: UNI-C, Danish Computing Centre for Research and Education
  9. Lines: 27
  10.  
  11. Preamble: The system is SCO unix 3.2.2.
  12.  
  13. Can anyone tell me, if I can get telnetd to preserve it's start-up env.
  14. var.s?  What I'm trying to do is this: /etc/wrapper is small program, that
  15. will read the peer-address of its input-socket, set an env.var. (say IP) to
  16. that adress, and then exec its arguments.  Thus when I put:
  17.  
  18. telnet stream tcp    nowait  NOLUID /etc/wrapper telnetd
  19.  
  20. in inetd.conf, it ought to make the IP available to telnetd and all of its
  21. children (login, sh).
  22.  
  23. But no.  No matter what I try, my IP gets lost somewhere.  I have som kind 
  24. of hint, that login will destroy most of its env. unless started with a -p
  25. option, but how can I do that (since telnetd starts login, the way *it* damn
  26. pleases)?
  27.  
  28. Maybe im doing this the wrong way; Can I get the sources for a telnet that
  29. will report it's IP-adresse. and perhaps make it available for the subsequent
  30. processes?
  31.  
  32. ((Gripe: I don't really understand why telnetd doesn't care *anything* for
  33. it's peer adress, but takes great pain to report terminal device id.  IMHO
  34. the latter thing is very maginally useful, but the peer address is handy
  35. for determining login terminal characteristics a.s.o.  I'm aware, that 
  36. terminals were once hardwired, but *dammit* that's ages ago.) Sorry about that)
  37.  
  38.