linux - Non imported environment variable with shellshock fixed bash version -



linux - Non imported environment variable with shellshock fixed bash version -

i have simple bash script modifies environment variable used subsequent binary. bellow basic script:

#!/bin/bash export dbroot="new_directory" export term=xterm su -c " <test_process> " - omni

dbroot variable used "test_process" environment variable. also, dbroot defined value "old_directory" global environment variable. goal of script forcefulness "test_process" utilize new_directory value (exported value).

with non patched bash version, test worked. however, after patching shellshock bug on bash, test_process not read exported value of dbroot neither global environment variables. it's if "test_process" ignores exported , global variables.

i don't have source code of "test_process". bash version version 2.05b.0(1)-release (rpm version bash-2.05b-41.7.i386.rpm ) , i'm running on red hat enterprise linux release 3

update: after recompiling bash 2.05b lastly sources setting compile-time definition

#define non_interactive_login_shells

the script worked again. without define bash misinterpreted - character after su command

that's pretty ancient software you're using.

i suggest trying:

su -c "dbroot='new_directory' term='xterm' <test_process> " - omni

this moves environment setting shell run su, rather relying on su relay environment.

linux bash shellshock-bash-bug

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -