From e8c950c65ebd5bb4ba0dcbfac869e7b40b902b8c Mon Sep 17 00:00:00 2001 From: kali Date: Wed, 8 Aug 2012 19:29:56 +0900 Subject: fix bad permission check on check_and_fix_urw_only (was not testing the mode properly. gotcha!) --- src/leap/util/fileutil.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/leap/util') 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( -- cgit v1.2.3