OSDN Git Service

Save environment snapshot and use at fork/exec
authorDavid Sehr <sehr@google.com>
Wed, 17 Aug 2016 02:22:57 +0000 (19:22 -0700)
committerDavid Sehr <sehr@google.com>
Thu, 18 Aug 2016 18:30:27 +0000 (11:30 -0700)
commit1488ff8aa3b041734ef0fbd113df512a2376e44e
treef56a2046aa03cd5ff2c637cb3e4c77c371ac23ef
parentb6f58cbfad5bb39d481d2986b2a8792bb42f65e7
Save environment snapshot and use at fork/exec

Some applications may inadvertently or maliciously set of environment
variables such as LD_LIBRARY_PATH before spawning subprocesses.
To make this more difficult, save the environment at the time the
runtime starts and use the saved copy anytime Exec is called.

BUG=b/30160149
TEST=make test-art-{host,target}-gtest-utils_test

Change-Id: Ice0097bf0de30db3d4ead124caf93316f39e3df3
runtime/runtime.cc
runtime/runtime.h
runtime/utils.cc
runtime/utils.h
runtime/utils_test.cc