summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorchiiph <chiiph@delloise.(none)>2013-04-08 14:40:52 -0300
committerchiiph <chiiph@delloise.(none)>2013-04-08 14:40:52 -0300
commit5a3898eeb7c2ed3bb5eb1f6b72bb2d782e579f6d (patch)
treeb003d0ff274e8b0039cee42ad1eb4acbd91cb1a3 /src
parent472371e0a929ead968d4dff1894333f0ac3b82f9 (diff)
parent59c6d949611abd867bb9d3b6bf712f199a7f39d5 (diff)
Merge remote-tracking branch 'kali/bug/fix-eip-osx-launch' into develop
Diffstat (limited to 'src')
-rw-r--r--src/leap/config/prefixers.py2
-rw-r--r--src/leap/services/eip/vpnlaunchers.py25
2 files changed, 25 insertions, 2 deletions
diff --git a/src/leap/config/prefixers.py b/src/leap/config/prefixers.py
index 460e5b46..72211790 100644
--- a/src/leap/config/prefixers.py
+++ b/src/leap/config/prefixers.py
@@ -96,7 +96,7 @@ class DarwinPrefixer(Prefixer):
config_dir = BaseDirectory.xdg_config_home
if not standalone:
return config_dir
- return os.getenv("LEAP_CLIENT_PATH", config_dir)
+ return os.getenv(os.getcwd(), "config")
class WindowsPrefixer(Prefixer):
diff --git a/src/leap/services/eip/vpnlaunchers.py b/src/leap/services/eip/vpnlaunchers.py
index 57a8092e..37c6256e 100644
--- a/src/leap/services/eip/vpnlaunchers.py
+++ b/src/leap/services/eip/vpnlaunchers.py
@@ -320,7 +320,15 @@ class DarwinVPNLauncher(VPNLauncher):
leap_assert(socket_host, "We need a socket host!")
leap_assert(socket_port, "We need a socket port!")
- openvpn_possibilities = which(self.OPENVPN_BIN)
+ kwargs = {}
+ if ProviderConfig.standalone:
+ kwargs['path_extension'] = os.path.join(
+ providerconfig.get_path_prefix(),
+ "..", "apps", "eip")
+
+ openvpn_possibilities = which(
+ self.OPENVPN_BIN,
+ **kwargs)
if len(openvpn_possibilities) == 0:
raise OpenVPNNotFoundException()
@@ -391,6 +399,21 @@ class DarwinVPNLauncher(VPNLauncher):
return [command] + cmd_args
+ def get_vpn_env(self, providerconfig):
+ """
+ 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
+
+ @param providerconfig: provider specific configuration
+ @type providerconfig: ProviderConfig
+
+ @rtype: dict
+ """
+ return {"LD_LIBRARY_PATH": os.path.join(
+ providerconfig.get_path_prefix(),
+ "..", "lib")}
+
class WindowsVPNLauncher(VPNLauncher):
"""