[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: REMOTEHOST variable



On Sun, Apr 08, 2001 at 12:50:20AM -0500, Tim wrote:
> what sets the REMOTEHOST variable upon login? Is it identd?

It isn't identd. Most systems don't even have an identd running.

AFAIK, it is the daemon which negotiates the connection. It is the first
user-level program which would be privy to that information. 

The kernel returns a struct to that program when a connection is open which
returns, among other things, the remote host ip address. The only way for any
other program to get the information would be to ask that program, or to get
it the same way netstat does out of the kernel connection tables. 

So if you mean with an interactive shell, it's probably in.telnetd, sshd,
rlogin, etc. For CGI scripts, it is probably Apache.

-- 
Jordan Bettis <http://www.hafd.org/~jordanb/>
  JUSTICE, n.  A commodity which is a more or less adulterated condition
  the State sells to the citizen as a reward for his allegiance, taxes
  and personal service.
   --From THE DEVIL'S DICTIONARY ((C)1911 Released April 15 1993)
-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.