summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Bcfg2/Client/Tools/POSIX/base.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Client/Tools/POSIX/base.py b/src/lib/Bcfg2/Client/Tools/POSIX/base.py
index 5e851261b..35dc57612 100644
--- a/src/lib/Bcfg2/Client/Tools/POSIX/base.py
+++ b/src/lib/Bcfg2/Client/Tools/POSIX/base.py
@@ -334,7 +334,9 @@ class POSIXTool(Bcfg2.Client.Tools.Tool):
representing the permissions entailed by it. representations can
either be a single octal digit, a string of up to three 'r',
'w', 'x', or '-' characters, or a posix1e.Permset object"""
- if hasattr(perms, 'test'):
+ if perms is None:
+ return 0
+ elif hasattr(perms, 'test'):
# Permset object
return sum([p for p in ACL_MAP.values()
if perms.test(p)])
@@ -545,6 +547,10 @@ class POSIXTool(Bcfg2.Client.Tools.Tool):
self.logger.error("POSIX: Unknown ACL scope %s" %
acl.get("scope"))
continue
+ if acl.get('perms') is None:
+ self.logger.error("POSIX: No permissions set for ACL: %s" %
+ Bcfg2.Client.XML.tostring(acl))
+ continue
wanted[(acl.get("type"), scope, acl.get(acl.get("scope")))] = \
self._norm_acl_perms(acl.get('perms'))
return wanted