diff options
author | Tomás Touceda <chiiph@leap.se> | 2014-08-02 16:43:28 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2014-08-02 16:43:28 -0300 |
commit | 5b04d2fe6ee586e9156e0eebf8d4024cc62fea92 (patch) | |
tree | c3f52f9b7f19f1e0f9b176fe935a9e6e31324e2f /src/leap/bitmask/services/eip/vpnprocess.py | |
parent | 3b02e227cfa48074739eb4f6634a436e65923b61 (diff) | |
parent | 3b469a2c006381ba9e56c1de92be4e87ad67e51b (diff) |
Merge remote-tracking branch 'refs/remotes/kali/feature/pseudo-cancel-eip' into develop
Diffstat (limited to 'src/leap/bitmask/services/eip/vpnprocess.py')
-rw-r--r-- | src/leap/bitmask/services/eip/vpnprocess.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/leap/bitmask/services/eip/vpnprocess.py b/src/leap/bitmask/services/eip/vpnprocess.py index d1a3fdaa..c6a7b98b 100644 --- a/src/leap/bitmask/services/eip/vpnprocess.py +++ b/src/leap/bitmask/services/eip/vpnprocess.py @@ -263,6 +263,18 @@ class VPN(object): BM_ROOT, "firewall", "stop"]) return True if exitCode is 0 else False + def bitmask_root_vpn_down(self): + """ + Bring openvpn down using the privileged wrapper. + """ + if IS_MAC: + # We don't support Mac so far + return True + BM_ROOT = force_eval(linuxvpnlauncher.LinuxVPNLauncher.BITMASK_ROOT) + exitCode = subprocess.call(["pkexec", + BM_ROOT, "openvpn", "stop"]) + return True if exitCode is 0 else False + def _kill_if_left_alive(self, tries=0): """ Check if the process is still alive, and send a |