bugzilla-daemon at bugzilla.mindrot.org
2010-Mar-01 20:57 UTC
[Bug 1729] New: Bash environmental associative arrays not getting set
https://bugzilla.mindrot.org/show_bug.cgi?id=1729 Summary: Bash environmental associative arrays not getting set Product: Portable OpenSSH Version: 5.2p1 Platform: Other OS/Version: Linux Status: NEW Severity: minor Priority: P2 Component: ssh AssignedTo: unassigned-bugs at mindrot.org ReportedBy: woodsdog at gmail.com In Bash 4.0 associative arrays were introduced. There are some environmental variables that are associative arrays. One of these variables is the BASH_ALIASES associative array. Documentation can be found here: http://www.gnu.org/software/bash/manual/bashref.html#Bash-Variables In short, it's an active array of the system aliases, with both the alias and the corresponding command kept track of. For example, to set: $ BASH_ALIASES[cdt]="cd /tmp" would be the equivalent of: $ alias cdt="cd /tmp" Setting this variable, the alias is instantly available in that bash environment. Now, when passing these variables with SSH, ssh doesn't interpret these variables as special. I've tested this on two different distros, Fedora 12 (OpenSSH_5.2p1) and Ubuntu 9.10 (OpenSSH_5.1p1). Both give different the same bad result. My environment file: $ cat environment BASH_ALIASES[cdt]="cd /tmp" TESTME="This is a test" On F12 & Ub 9.10: -after an ssh to Ub 9.10 box, the $TESTME variable is set and can be seen when the 'set' or 'env' command is run. The $BASH_ALIASES variable appears in the list as a regular environment variable, ignoring the associative There is no "cdt" alias either. It didn't add this to the associative array. $ env | grep BASH BASH_ALIASES[cdt]="cd /tmp" $ -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2010-Mar-25 23:50 UTC
[Bug 1729] Bash environmental associative arrays not getting set
https://bugzilla.mindrot.org/show_bug.cgi?id=1729 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |djm at mindrot.org Status|NEW |RESOLVED Resolution| |WONTFIX --- Comment #1 from Damien Miller <djm at mindrot.org> 2010-03-26 10:50:27 EST --- I don't think that this is under our control - OpenSSH passes all variables though execve() and doesn't filter them if they contain special characters (e.g. square brackets). Perhaps your kernel or bash itself it rejecting them? -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2010-Apr-16 05:50 UTC
[Bug 1729] Bash environmental associative arrays not getting set
https://bugzilla.mindrot.org/show_bug.cgi?id=1729 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #2 from Damien Miller <djm at mindrot.org> 2010-04-16 15:50:47 EST --- Mass move of bugs RESOLVED->CLOSED following the release of openssh-5.5p1 -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. You are watching someone on the CC list of the bug.