bug-bash
[Top][All Lists]
Advanced

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

[50 character or so descriptive subject here (for reference)]


From: Alain Knaff
Subject: [50 character or so descriptive subject here (for reference)]
Date: Sat, 17 Mar 2001 08:57:35 +0100

Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnulibc1
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' 
-DCONF_OSTYPE='linux-gnulibc1' -DCONF_MACHTYPE='i686-pc-linux-gnulibc1' 
-DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./lib 
-I/usr/local/include -g -O2
uname output: Linux hitchhiker 2.4.1 #2 jeu fév 1 23:09:49 CET 2001 i686 unknown
Machine Type: i686-pc-linux-gnulibc1

Bash Version: 2.03
Patch Level: 0
Release Status: release

Description:
        Bash clears SSH_CLIENT environment variable on startup

Repeat-By:
        1st method:
        -----------
        > ssh bashuser@remotehost printenv SSH_CLIENT
        [nothing]
        With other shells it works:
        > ssh zshuser@remotehost printenv SSH_CLIENT
        213.166.61.72 1023 22

        2nd method:
        -----------
        > export SSH_CLIENT=test
        > printenv SSH_CLIENT
        test
        > bash -c 'printenv SSH_CLIENT'
        As you see, bash -c seems to clean out SSH_CLIENT. All other
        environment variables are kept:
        > export TESTING=a
        > bash -c 'printenv TESTING'
        a

        N.B. This also seems to happen with shellscripts:
        #!/bin/bash

        printenv SSH_CLIENT

        This script will never print anything, even if SSH_CLIENT is
        set when invoking it.

Fix:
        No workaround known (except using zsh instead of bash...)



reply via email to

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