aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.org>2010-04-26 13:35:55 +0000
committerEugeni Dodonov <eugeni@mandriva.org>2010-04-26 13:35:55 +0000
commit95fc81cf3d46e809a34bf30ebc1ab83be19705a6 (patch)
tree2a5ecbae8a1f071cd9fdb6d8a36cd7d95c8b8175 /src
parent4cacf031a2aa0ef0b31b92085624bebb8084d73d (diff)
downloadmsec-95fc81cf3d46e809a34bf30ebc1ab83be19705a6.tar
msec-95fc81cf3d46e809a34bf30ebc1ab83be19705a6.tar.gz
msec-95fc81cf3d46e809a34bf30ebc1ab83be19705a6.tar.bz2
msec-95fc81cf3d46e809a34bf30ebc1ab83be19705a6.tar.xz
msec-95fc81cf3d46e809a34bf30ebc1ab83be19705a6.zip
Only merge legacy perm.local if exists
Diffstat (limited to 'src')
-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 21f7e31..2d49495 100755
--- a/src/msec/msecperms.py
+++ b/src/msec/msecperms.py
@@ -144,10 +144,11 @@ if __name__ == "__main__":
# load variables from base level
config.merge_with_baselevel(log, permconf, base_level, config.load_default_perms, root='')
- # 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)
# reloading levelconf for base level
levelconf = config.load_default_perms(log, base_level, root=root)