From owner-freebsd-security Mon Jan 29 12: 8:39 2001 Delivered-To: freebsd-security@freebsd.org Received: from modemcable101.200-201-24.mtl.mc.videotron.ca (modemcable140.61-201-24.mtl.mc.videotron.ca [24.201.61.140]) by hub.freebsd.org (Postfix) with SMTP id 3A04737B698 for ; Mon, 29 Jan 2001 12:08:10 -0800 (PST) Received: (qmail 24091 invoked from network); 29 Jan 2001 20:08:09 -0000 Received: from cognac.local.mindstep.com (HELO cognac) (192.168.10.9) by jacuzzi.local.mindstep.com with SMTP; 29 Jan 2001 20:08:09 -0000 From: "Patrick Bihan-Faou" To: Cc: Subject: Bash2 removes SSH_CLIENT from the environment Date: Mon, 29 Jan 2001 15:09:30 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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 ? Patrick. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message