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