Re: Bash2 removes SSH_CLIENT from the environment
From: Peter Pentchev (roam@orbitel.bg)
Date: 01/30/01
- Next message: FreeBSD Security Advisories: "FreeBSD Ports Security Advisory: FreeBSD-SA-01:07.xfree86"
- Previous message: FBSDSecure@aol.com: "Re: (no subject)"
- In reply to: Patrick Bihan-Faou: "Bash2 removes SSH_CLIENT from the environment"
- Next in thread: Chet Ramey: "Re: Bash2 removes SSH_CLIENT from the environment"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 30 Jan 2001 10:34:16 +0200 From: Peter Pentchev <roam@orbitel.bg> To: Patrick Bihan-Faou <patrick@netzuno.com>
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
- Next message: FreeBSD Security Advisories: "FreeBSD Ports Security Advisory: FreeBSD-SA-01:07.xfree86"
- Previous message: FBSDSecure@aol.com: "Re: (no subject)"
- In reply to: Patrick Bihan-Faou: "Bash2 removes SSH_CLIENT from the environment"
- Next in thread: Chet Ramey: "Re: Bash2 removes SSH_CLIENT from the environment"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|