diff options
author | Dan Willemsen <dwillemsen@google.com> | 2017-10-28 22:57:22 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2018-05-18 13:24:36 -0700 |
commit | a14704c12bbcc1eb207d1c0ff3df0140a4582fc5 (patch) | |
tree | f1d879ec6c4550b3b9ba92bcc7836ca69f6aacd3 /python/scripts/stub_template_host.txt | |
parent | 6af008fc0f69cfa175e47b0789b42d073ed6fa23 (diff) | |
download | android_build_soong-a14704c12bbcc1eb207d1c0ff3df0140a4582fc5.tar.gz android_build_soong-a14704c12bbcc1eb207d1c0ff3df0140a4582fc5.tar.bz2 android_build_soong-a14704c12bbcc1eb207d1c0ff3df0140a4582fc5.zip |
Add path interposer
This will allow us to track (and eventually limit) the commands that the
build references via $PATH. These are mostly implicit dependencies on
the host system -- for Linux, we assume something similar to Ubuntu
14.04 with a few extra packages, but this will let us better define
that.
This will not catch uses of tools with absolute paths (/bin/bash, etc),
but most uses shouldn't be relying on absolute path names anyways.
Adds ~400ms on the first startup, ~140ms on subsequent runs, and
overhead of a few ms for every forwarded execution.
Test: m
Test: build/soong/build_test.bash
Test: Add `gcc --version`, TEMPORARY_DISABLE_PATH_RESTRICTIONS=true m
Change-Id: Id68cbb1c8ceef65bbbb10751e83722c7662d2351
Diffstat (limited to 'python/scripts/stub_template_host.txt')
-rw-r--r-- | python/scripts/stub_template_host.txt | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/python/scripts/stub_template_host.txt b/python/scripts/stub_template_host.txt index b90a28b5..386298eb 100644 --- a/python/scripts/stub_template_host.txt +++ b/python/scripts/stub_template_host.txt @@ -18,8 +18,6 @@ def SearchPathEnv(name): for directory in search_path: if directory == '': continue path = os.path.join(directory, name) - if os.path.islink(path): - path = os.path.realpath(path) # Check if path is actual executable file. if os.path.isfile(path) and os.access(path, os.X_OK): return path |