Date: Tue, 30 Jan 2001 10:34:16 +0200 From: Peter Pentchev <roam@orbitel.bg> To: Patrick Bihan-Faou <patrick@netzuno.com> Cc: freebsd-hackers@freebsd.org, freebsd-security@freebsd.org Subject: Re: Bash2 removes SSH_CLIENT from the environment Message-ID: <20010130103415.B328@ringworld.oblivion.bg> In-Reply-To: <HJEEKLMFLKEOKHOKNPBMGEIGCJAA.patrick@netzuno.com>; from patrick@netzuno.com on Mon, Jan 29, 2001 at 03:09:30PM -0500 References: <HJEEKLMFLKEOKHOKNPBMGEIGCJAA.patrick@netzuno.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jan 29, 2001 at 03:09:30PM -0500, Patrick Bihan-Faou wrote: > Hi, > > I am writing some script that looks for the SSH_CLIENT environment variable. > As specified in the sshd(8) man page, this variable should contain the IP > address of the client, the port number on the client side and the port > number on the server side. > > However I found that if the login shell of the user is set to bash (version > 2.03 or 2.04 at least), this variable is never set. Upon inspection of the > code for bash, it appears that bash is explicitely removing the definition > of this environment variable. Would anybody have an idea why ??? > > Also the fix to leave SSH_CLIENT defined is trivial, is that something that > would be desirable for the bash2 port ? Huh? [roam@ringworld:v2 ~]$ ssh roam@localhost '/bin/echo "shell is $BASH_VERSION, SSH_CLIENT is $SSH_CLIENT"' roam@localhost.office1's password: shell is 2.04.0(1)-release, SSH_CLIENT is 127.0.0.1 1075 22 [roam@ringworld:v2 ~]$ This is on 4.2-stable with bash installed from the shells/bash2 port. Are you sure you don't have anything in your profiles that unsets unknown variables or something? G'luck, Peter -- .siht ekil ti gnidaer eb d'uoy ,werbeH ni erew ecnetnes siht fI To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010130103415.B328>