Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 369467

Summary: RDTCommandLauncher#execute method incorrectly handles env var values containing '=' characters
Product: [Tools] Linux Tools Reporter: Corey Ashford <cjashfor>
Component: ProjectAssignee: Linux Distros Inbox <linux.distros-inbox>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
fix the env var processing bug, and also improves error message handling none

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.