diff options
author | Ivan Alejandro <ivanalejandro0@gmail.com> | 2014-12-19 14:45:53 -0300 |
---|---|---|
committer | Ivan Alejandro <ivanalejandro0@gmail.com> | 2014-12-19 14:45:53 -0300 |
commit | 6378638e94df93c3a13f10adc3b6946f6b132be0 (patch) | |
tree | fe61287d97bcd30fccae8bb315e30bca805a1b8a | |
parent | 855e96cefe975e50d140e6c8aa7d3407931b25d7 (diff) |
Forward the right env data to subprocess call.
Closes #6123.
-rw-r--r-- | changes/bug-6123_forward-right-env-data | 1 | ||||
-rw-r--r-- | src/leap/bitmask/util/privilege_policies.py | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/changes/bug-6123_forward-right-env-data b/changes/bug-6123_forward-right-env-data new file mode 100644 index 00000000..10bd8604 --- /dev/null +++ b/changes/bug-6123_forward-right-env-data @@ -0,0 +1 @@ +- Forward the right environment data to subprocess call. Closes #6123. diff --git a/src/leap/bitmask/util/privilege_policies.py b/src/leap/bitmask/util/privilege_policies.py index 68a1af28..65132133 100644 --- a/src/leap/bitmask/util/privilege_policies.py +++ b/src/leap/bitmask/util/privilege_policies.py @@ -149,7 +149,12 @@ class LinuxPolicyChecker(PolicyChecker): """ env = None if flags.STANDALONE: - env = {"PYTHONPATH": os.path.abspath('../../../../lib/')} + # This allows us to send to subprocess the environment configs that + # works for the standalone bundle (like the PYTHONPATH) + env = dict(os.environ) + # The LD_LIBRARY_PATH is set on the launcher but not forwarded to + # subprocess unless we do so explicitly. + env["LD_LIBRARY_PATH"] = os.path.abspath("./lib/") try: # We need to quote the command because subprocess call # will do "sh -c 'foo'", so if we do not quoute it we'll end |