diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/msec/msecperms.py | 9 |
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) |