home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: sparky!uunet!mcsun!Germany.EU.net!math.fu-berlin.de!news.th-darmstadt.de!rs4.hrz.th-darmstadt.de!liebe
- From: liebe@rs4.hrz.th-darmstadt.de (Andreas Liebe)
- Subject: How to obtain peername in Telnet/Rlogin-Application
- Sender: news@news.th-darmstadt.de (The Usenet-News System)
- Message-ID: <1992Aug25.165148.7108@news.th-darmstadt.de>
- Date: Tue, 25 Aug 1992 16:51:48 GMT
- Reply-To: liebe@hrz.th-darmstadt.de
- Nntp-Posting-Host: rs4.hrz.th-darmstadt.de
- Organization: TU Darmstadt
- Lines: 24
-
- Hi,
-
- I have an application which is started directly after /bin/login by an
- entry in /etc/passwd similar to
-
- myuser::100:100:Some Text:/u/myapp:/u/myapp/bin/myprog
-
- The application can be used by everyone (no password), but I want to
- write a logfile where we can see where the conection came from.
- Due to the fact, that 'myprog' was started by /bin/login and not
- by the inetd I can't use 'getpeername'.
- I might get the info out of /etc/utmp, but the host-entry is only
- 16 bytes long - not enough for most domainnames.
-
- Is there a way to obtain the complete domainname or the IP-address ?
-
- Thanks in advance
-
- Andreas
- --
- _ _ _ _ TH-Darmstadt Voice: +49 6151 163150
- /_/ / / /_ /_//_ Computing Centre Fax: +49 6151 163050
- / /./_ / /_ /_//_ Petersenstrasse 30 EMail:
- D6100 Darmstadt (Germany) liebe@hrz.th-darmstadt.de
-