[Top][All Lists]

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

SSH_CLIENT not auto-exported. Why? (Fwd)

From: Anthony Thyssen
Subject: SSH_CLIENT not auto-exported. Why? (Fwd)
Date: Wed, 24 Oct 2001 16:17:56 +1000

I have been tossing up switching from tcsh (interactive shell of choice
for the last 12 years) to bash.  However I found to my dismay that a
number of my shell scripts suddenly started to break when I did use

Eventually I traced this to bash not passing the exported variable
SSH_CLIENT from its parent to its own exported environment!

I use this variable a lot to
   1/ Determine that I logged into the that machine via SSH
   2/ Determine the IP address I am logging in from.

I figured this was pobbably a mistake by bash as the manual makes no
mention of any variable not passed from parent to its working
environment. Though I figured that bash must check that varaible for
simular reasons I do (EG: remote execution of the bash shell).

As such I was supprised to find that bash first tests that variable
exists (for the reason I figured), but then explicitly unsets it
with a comment to say not to re-export it.

To top it off The CHANGES file says..
  t.  The SSH_CLIENT environment variable is no longer auto-exported.

Ok fine.. It was on purpose. But WHY?
No reason is given.

That variable is very important, it isn't exported by sshd just for
bash to unset it. Bash doesn't seem to unset any other variables so

PS: bash manpage says to contact <address@hidden> for error and problems
however that email address bounced.

  Anthony Thyssen ( System Programmer )    http://www.sct.gu.edu.au/~anthony/
`` What are the facts? Again and again and again -- what are the _facts_?
   Shun wishful thinking, ignore divine revelation, forget what `the stars
   foretell', avoid opinion, care not what the neighbors think, never mind
   the unguessable `verdict of history', -- what are the facts, and to how
   many decimal places? You pilot always into an unknown future; facts are
   your only clue. Get the facts! '' -- Lazuras Long, (Aka. Robert Heinlein)
     PGP Public Key available -- finger -l address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]