linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Holger Kiehl <Holger.Kiehl@dwd.de>
To: linux-c-programming@vger.kernel.org
Subject: Is it possible to trace back from where a user comes
Date: Wed, 29 Oct 2003 08:29:09 +0000 (GMT)	[thread overview]
Message-ID: <Pine.LNX.4.44.0310290808580.16385-100000@praktifix.dwd.de> (raw)

Hello

I have written a small program that allows a user to do some configuration.
Now everytime the user does configure something it gets logged to a log
file. Usually when someone comes from a remote machine I took the
environment variable DISPLAY and if that is not there the output from
"who am i", to determine from where the user comes. However this does
not work reliably since DISPLAY is set to localhost when the user is using
ssh, also "who am i" does not always tell me from where a user comes.
Another problem is when the user first logs in on say host1 then to host2
and then to host3. Is there a way to determine that the user comes from
host1? The SSH_CLIENT environment variable is always set to the last
host, so this can not be used. SSH_CONNECTION is not set so this can
also not be used. I also looked at struct utmp it to does not provide
the information, it is also not very portable since the structure differs
a lot from system to system.

So is there a way to determine from where a user comes?

Thanks,
Holger


             reply	other threads:[~2003-10-29  8:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-29  8:29 Holger Kiehl [this message]
2003-10-29  8:50 ` Is it possible to trace back from where a user comes Jeff Woods
2003-11-04 13:19   ` Rivalino M. Jr.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0310290808580.16385-100000@praktifix.dwd.de \
    --to=holger.kiehl@dwd.de \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).