home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / admin / 6204 < prev    next >
Encoding:
Text File  |  1992-11-15  |  1.6 KB  |  36 lines

  1. Newsgroups: comp.unix.admin
  2. Path: sparky!uunet!mcsun!sunic!kth.se!lysator.liu.se!pen
  3. From: pen@lysator.liu.se (Peter Eriksson)
  4. Subject: Re: Identifying user's remote IP address at login?
  5. Message-ID: <1978@lysator.liu.se>
  6. Sender: news@lysator.liu.se
  7. Nntp-Posting-Host: robin.lysator.liu.se
  8. Organization: Lysator Academic Computer Society, Linkoping University, Sweden
  9. References: <1992Oct29.004719.9096@news.ysu.edu> <BxM36A.5HA@wang.com>     <1duaqkINNj2o@fnnews.fnal.gov> <CKD.92Nov12161221@loiosh.eff.org> <1992Nov15.031633.16012@bradley.bradley.edu>
  10. Date: Mon, 16 Nov 1992 08:53:13 GMT
  11. Lines: 23
  12.  
  13. brad@bradley.bradley.edu (Bradley E. Smith) writes:
  14.  
  15. >why not write a program similar to this one.....and use getpeername
  16.  
  17. Won't work. Most systems use a telnet daemon that "insulates" the user
  18. processes from the network stream so the user process can't do the
  19. getpeername() call. What one *could* do if one is really brave is to
  20. write a program that opens /dev/kmem and locates the telnetd process that
  21. handles _your_ session, and then walk thru the files it has open looking for
  22. the network connection socket... Or one could rewrite telnetd to either write
  23. the IP number into the log files (that is what I did. And then I rewrote
  24. "who", et al to use nameserver lookups for the IP numbers.) or have it write
  25. the full domain name into a separate log file...
  26.  
  27. Either way requires root access.
  28.  
  29. /Peter
  30.  
  31.  
  32. --
  33. Peter Eriksson                                              pen@lysator.liu.se
  34. Lysator Academic Computer Society                 ...!uunet!lysator.liu.se!pen
  35. University of Linkoping, Sweden                I'm still bored. Flame me again.
  36.