summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Client/Tools/POSIX/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2/Client/Tools/POSIX/base.py')
-rw-r--r--src/lib/Bcfg2/Client/Tools/POSIX/base.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/Bcfg2/Client/Tools/POSIX/base.py b/src/lib/Bcfg2/Client/Tools/POSIX/base.py
index 94a490fda..355f70ac9 100644
--- a/src/lib/Bcfg2/Client/Tools/POSIX/base.py
+++ b/src/lib/Bcfg2/Client/Tools/POSIX/base.py
@@ -138,8 +138,15 @@ class POSIXTool(Bcfg2.Client.Tools.Tool):
rv &= self._set_acls(entry, path=path)
return rv
- def _apply_acl(self, acl, path, atype=posix1e.ACL_TYPE_ACCESS):
+ def _apply_acl(self, acl, path, atype=None):
""" Apply the given ACL to the given path """
+ if atype is None:
+ # the default value for atype is set this way (rather than
+ # in the argument list) because posix1e libs may not be
+ # installed, and this code is executed at run-time (and
+ # thus will never be reached if ACLs aren't supported),
+ # but argument lists are parsed at compile-time
+ atype = posix1e.ACL_TYPE_ACCESS
if atype == posix1e.ACL_TYPE_ACCESS:
atype_str = "access"
else:
@@ -516,8 +523,6 @@ class POSIXTool(Bcfg2.Client.Tools.Tool):
if val is not None:
entry.set(attr, str(val))
- print "about to verify acls; errors=%s" % errors
-
return self._verify_acls(entry, path=path) and len(errors) == 0
def _list_entry_acls(self, entry):