Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369467 - RDTCommandLauncher#execute method incorrectly handles env var values containing '=' characters
Summary: RDTCommandLauncher#execute method incorrectly handles env var values containi...
Status: CLOSED INVALID
Alias: None
Product: Linux Tools
Classification: Tools
Component: Project (show other bugs)
Version: unspecified   Edit
Hardware: All Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Linux Distros Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-23 20:35 EST by Corey Ashford CLA
Modified: 2012-01-23 20:59 EST (History)
0 users

See Also:


Attachments
fix the env var processing bug, and also improves error message handling (4.72 KB, patch)
2012-01-23 20:38 EST, Corey Ashford CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Corey Ashford CLA 2012-01-23 20:35:39 EST
Build Identifier: M20110909-1335

When the execute method transfers the environment array into a hash map, it splits the <env_var>=<env_var_value> string using split('='), but this doesn't work correctly if the env_var_value itself contains '=' characters.  For example, if the original string is

FOO_SWITCH=--out-file=/home/corey/out.txt

the code adds an env var to the hash map as 

FOO_SWITCH  --outfile

in other words, everthing past the first '=' in the value is discarded.

Reproducible: Always

Steps to Reproduce:
run the /bin/env utility remotely using the RDTCommandLauncher, with an environment variable set to value containing an embedded '='.  The value of the variable displayed will match the pattern described in the details.
Comment 1 Corey Ashford CLA 2012-01-23 20:38:05 EST
Created attachment 209950 [details]
fix the env var processing bug, and also improves error message handling
Comment 2 Corey Ashford CLA 2012-01-23 20:59:43 EST
Sorry, this patch is against my internal branch, not the master branch.  I will create a new bug which properly describes and fixes the upstream code.