home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / programm / 4439 < prev    next >
Encoding:
Text File  |  1992-08-25  |  1.4 KB  |  37 lines

  1. Newsgroups: comp.unix.programmer
  2. Path: sparky!uunet!mcsun!Germany.EU.net!math.fu-berlin.de!news.th-darmstadt.de!rs4.hrz.th-darmstadt.de!liebe
  3. From: liebe@rs4.hrz.th-darmstadt.de (Andreas Liebe)
  4. Subject: How to obtain peername in Telnet/Rlogin-Application
  5. Sender: news@news.th-darmstadt.de (The Usenet-News System)
  6. Message-ID: <1992Aug25.165148.7108@news.th-darmstadt.de>
  7. Date: Tue, 25 Aug 1992 16:51:48 GMT
  8. Reply-To: liebe@hrz.th-darmstadt.de
  9. Nntp-Posting-Host: rs4.hrz.th-darmstadt.de
  10. Organization: TU Darmstadt
  11. Lines: 24
  12.  
  13. Hi,
  14.  
  15.  I have an application which is started directly after /bin/login by an
  16.  entry in /etc/passwd similar to
  17.  
  18. myuser::100:100:Some Text:/u/myapp:/u/myapp/bin/myprog
  19.  
  20.  The application can be used by everyone (no password), but I want to
  21.  write a logfile where we can see where the conection came from.
  22.  Due to the fact, that 'myprog' was started by /bin/login and not
  23.  by the inetd I can't use 'getpeername'.
  24.  I might get the info out of /etc/utmp, but the host-entry is only
  25.  16 bytes long - not enough for most domainnames.
  26.  
  27.  Is there a way to obtain the complete domainname or the IP-address ?
  28.  
  29. Thanks in advance
  30.  
  31.    Andreas
  32. -- 
  33.      _        _  _  _  TH-Darmstadt               Voice: +49 6151 163150
  34.    /_/ /  / /_ /_//_   Computing Centre           Fax:   +49 6151 163050     
  35.   / /./_ / /_ /_//_    Petersenstrasse 30         EMail:
  36.                        D6100 Darmstadt (Germany)   liebe@hrz.th-darmstadt.de
  37.