From f9326a1996a665171c37e0f35a53e037c50666e8 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Tue, 25 Sep 2012 14:03:55 -0400 Subject: misc. minor bug fixes --- src/lib/Bcfg2/Client/Tools/POSIX/base.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/lib/Bcfg2/Client/Tools') 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): -- cgit v1.2.3-1-g7c22