summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-10-02 11:55:11 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-10-02 11:55:11 -0400
commit378575687532d10915dc0327389c953281d7a2ba (patch)
tree9f2586405e0d06b7d84e347a31fb2071f629c115 /src
parentff4c1cfea4ab6039e44d062a218ad3978b1ae280 (diff)
downloadbcfg2-378575687532d10915dc0327389c953281d7a2ba.tar.gz
bcfg2-378575687532d10915dc0327389c953281d7a2ba.tar.bz2
bcfg2-378575687532d10915dc0327389c953281d7a2ba.zip
consistently list ACLs on Path entries
Diffstat (limited to 'src')
-rw-r--r--src/lib/Bcfg2/Client/Tools/POSIX/base.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/Bcfg2/Client/Tools/POSIX/base.py b/src/lib/Bcfg2/Client/Tools/POSIX/base.py
index 0d3bd3c35..07d4ab015 100644
--- a/src/lib/Bcfg2/Client/Tools/POSIX/base.py
+++ b/src/lib/Bcfg2/Client/Tools/POSIX/base.py
@@ -173,8 +173,10 @@ class POSIXTool(Bcfg2.Client.Tools.Tool):
def _set_acls(self, entry, path=None): # pylint: disable=R0912
""" set POSIX ACLs on the file on disk according to the config """
+ acls = self._list_entry_acls(entry)
+
if not HAS_ACLS:
- if entry.findall("ACL"):
+ if acls:
self.logger.debug("POSIX: ACLs listed for %s but no pylibacl "
"library installed" % entry.get('name'))
return True
@@ -188,7 +190,7 @@ class POSIXTool(Bcfg2.Client.Tools.Tool):
err = sys.exc_info()[1]
if err.errno == 95:
# fs is mounted noacl
- if entry.findall("ACL"):
+ if acls:
self.logger.error("POSIX: Cannot set ACLs on filesystem "
"mounted without ACL support: %s" % path)
else:
@@ -221,7 +223,7 @@ class POSIXTool(Bcfg2.Client.Tools.Tool):
else:
defacl = None
- for aclkey, perms in self._list_entry_acls(entry).items():
+ for aclkey, perms in acls.items():
atype, scope, qualifier = aclkey
if atype == "default":
if defacl is None: