summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2017-05-19 14:31:46 +0200
committerRuben Pollan <meskio@sindominio.net>2017-05-22 12:56:21 +0200
commit9b415b6423c7dd18fe9ffa302c3343dfa2314619 (patch)
tree186a80d4c6f1542a24084acafd286fc9385c7fc3
parent4c75ff68fe2b629c3f53b51a07ab20e6bfa52bf0 (diff)
[refactor] remove env code
no need to setup LD_LIBRARY_PATH anymore, we're shipping a static binary.
-rw-r--r--src/leap/bitmask/vpn/_control.py2
-rw-r--r--src/leap/bitmask/vpn/_management.py7
-rw-r--r--src/leap/bitmask/vpn/launcher.py11
-rw-r--r--src/leap/bitmask/vpn/launchers/darwin.py15
-rw-r--r--src/leap/bitmask/vpn/launchers/linux.py15
5 files changed, 0 insertions, 50 deletions
diff --git a/src/leap/bitmask/vpn/_control.py b/src/leap/bitmask/vpn/_control.py
index 85e4911..c0b748b 100644
--- a/src/leap/bitmask/vpn/_control.py
+++ b/src/leap/bitmask/vpn/_control.py
@@ -68,8 +68,6 @@ class VPNControl(object):
raise
env = os.environ
- for key, val in vpnproc.vpn_env.items():
- env[key] = val
reactor.spawnProcess(vpnproc, cmd[0], cmd, env)
self._vpnproc = vpnproc
diff --git a/src/leap/bitmask/vpn/_management.py b/src/leap/bitmask/vpn/_management.py
index 453b042..6e24f47 100644
--- a/src/leap/bitmask/vpn/_management.py
+++ b/src/leap/bitmask/vpn/_management.py
@@ -298,13 +298,6 @@ class VPNManagement(object):
if self.is_connected():
return self._parse_status_and_notify(self._send_command("status"))
- @property
- def vpn_env(self):
- """
- Return a dict containing the vpn environment to be used.
- """
- return self._launcher.get_vpn_env()
-
def terminate_openvpn(self, shutdown=False):
"""
Attempts to terminate openvpn by sending a SIGTERM.
diff --git a/src/leap/bitmask/vpn/launcher.py b/src/leap/bitmask/vpn/launcher.py
index fa9923a..28c8a31 100644
--- a/src/leap/bitmask/vpn/launcher.py
+++ b/src/leap/bitmask/vpn/launcher.py
@@ -279,17 +279,6 @@ class VPNLauncher(object):
return command_and_args
@classmethod
- def get_vpn_env(kls):
- """
- Return a dictionary with the custom env for the platform.
- This is mainly used for setting LD_LIBRARY_PATH to the correct
- path when distributing a standalone client
-
- :rtype: dict
- """
- return {}
-
- @classmethod
def missing_updown_scripts(kls):
"""
Return what updown scripts are missing.
diff --git a/src/leap/bitmask/vpn/launchers/darwin.py b/src/leap/bitmask/vpn/launchers/darwin.py
index 9ae6405..3d77e18 100644
--- a/src/leap/bitmask/vpn/launchers/darwin.py
+++ b/src/leap/bitmask/vpn/launchers/darwin.py
@@ -182,18 +182,3 @@ class DarwinVPNLauncher(VPNLauncher):
command.extend(['--setenv', "LEAPUSER", getpass.getuser()])
return command
-
- @classmethod
- def get_vpn_env(kls):
- """
- Returns a dictionary with the custom env for the platform.
- This is mainly used for setting LD_LIBRARY_PATH to the correct
- path when distributing a standalone client
-
- :rtype: dict
- """
- ld_library_path = os.path.join(get_path_prefix(), "..", "lib")
- ld_library_path.encode(sys.getfilesystemencoding())
- return {
- "DYLD_LIBRARY_PATH": ld_library_path
- }
diff --git a/src/leap/bitmask/vpn/launchers/linux.py b/src/leap/bitmask/vpn/launchers/linux.py
index f8bb8ed..5852d1e 100644
--- a/src/leap/bitmask/vpn/launchers/linux.py
+++ b/src/leap/bitmask/vpn/launchers/linux.py
@@ -153,18 +153,3 @@ class LinuxVPNLauncher(VPNLauncher):
cmd += 'chmod 744 "%s"\n' % (openvpn_bin_path, )
return cmd
-
- @classmethod
- def get_vpn_env(kls):
- """
- Returns a dictionary with the custom env for the platform.
- This is mainly used for setting LD_LIBRARY_PATH to the correct
- path when distributing a standalone client
-
- :rtype: dict
- """
- ld_library_path = os.path.join(get_path_prefix(), "..", "lib")
- ld_library_path.encode(sys.getfilesystemencoding())
- return {
- "LD_LIBRARY_PATH": ld_library_path
- }