summaryrefslogtreecommitdiff
path: root/src/leap/services/eip
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-06-23 23:54:22 +0900
committerKali Kaneko <kali@leap.se>2013-06-23 23:54:22 +0900
commit4a0536e5831eeac539c1b746932e60d4dd5e9591 (patch)
tree16c4590c7bfce754c31a1fa87326c0b29baf5a11 /src/leap/services/eip
parent53668de6f4ced844b10fc34fbc5ba77b00d54825 (diff)
parentb265380ebedb1603933251a6e8fd0e7c850eba5a (diff)
Merge remote-tracking branch 'chiiph/bug/properly_check_permissions' into develop
Diffstat (limited to 'src/leap/services/eip')
-rw-r--r--src/leap/services/eip/vpnlaunchers.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/leap/services/eip/vpnlaunchers.py b/src/leap/services/eip/vpnlaunchers.py
index 762b536d..c5b21eac 100644
--- a/src/leap/services/eip/vpnlaunchers.py
+++ b/src/leap/services/eip/vpnlaunchers.py
@@ -24,6 +24,7 @@ import getpass
import os
import platform
import subprocess
+import stat
try:
import grp
except ImportError:
@@ -167,7 +168,7 @@ def _has_updown_scripts(path, warn=True):
"Might produce DNS leaks." % (path,))
# XXX check if applies in win
- is_exe = os.access(path, os.X_OK)
+ is_exe = (stat.S_IXUSR & os.stat(path)[stat.ST_MODE] != 0)
if warn and not is_exe:
logger.error("Up/down script %s is not executable. "
"Might produce DNS leaks." % (path,))