summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-08-08 19:29:56 +0900
committerkali <kali@leap.se>2012-08-08 19:29:56 +0900
commite8c950c65ebd5bb4ba0dcbfac869e7b40b902b8c (patch)
tree25f150ba759b9d85044fde362570c58fcfb8c62d /src/leap
parentd769925c9819c012602595cc0f47c8a81444ca0e (diff)
fix bad permission check on check_and_fix_urw_only
(was not testing the mode properly. gotcha!)
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/util/fileutil.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/leap/util/fileutil.py b/src/leap/util/fileutil.py
index cc3bf34b..429e4b12 100644
--- a/src/leap/util/fileutil.py
+++ b/src/leap/util/fileutil.py
@@ -96,7 +96,9 @@ def check_and_fix_urw_only(_file):
test for 600 mode and try
to set it if anything different found
"""
- mode = os.stat(_file).st_mode
+ mode = stat.S_IMODE(
+ os.stat(_file).st_mode)
+
if mode != int('600', 8):
try:
logger.warning(