aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.org>2010-04-26 13:35:30 +0000
committerEugeni Dodonov <eugeni@mandriva.org>2010-04-26 13:35:30 +0000
commitf182ca4ca79d405c8af6cbd148b77ced96416abe (patch)
tree51570c3fc38af62c1a0be0a9aa2c0d17cd51248f
parentb44d8f6f730237f773502439738747a5c1180063 (diff)
downloadmsec-f182ca4ca79d405c8af6cbd148b77ced96416abe.tar
msec-f182ca4ca79d405c8af6cbd148b77ced96416abe.tar.gz
msec-f182ca4ca79d405c8af6cbd148b77ced96416abe.tar.bz2
msec-f182ca4ca79d405c8af6cbd148b77ced96416abe.tar.xz
msec-f182ca4ca79d405c8af6cbd148b77ced96416abe.zip
Only merge with perm.local if it exists
-rwxr-xr-xsrc/msec/msecperms.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/msec/msecperms.py b/src/msec/msecperms.py
index 4e1c42b..f187302 100755
--- a/src/msec/msecperms.py
+++ b/src/msec/msecperms.py
@@ -169,10 +169,11 @@ if __name__ == "__main__":
newlevel.save()
sys.exit(0)
- # merge with a legacy perm.local
- permlocal = config.PermConfig(log, config="%s/etc/security/msec/perm.local" % root)
- permlocal.load()
- permconf.merge(permlocal, overwrite=True)
+ # merge with a legacy perm.local if exists
+ if os.access("%s/etc/security/msec/perm.local" % root, os.R_OK):
+ permlocal = config.PermConfig(log, config="%s/etc/security/msec/perm.local" % root)
+ permlocal.load()
+ permconf.merge(permlocal, overwrite=True)
# load the main permission class
perm = PERMS(log, root=root)