diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-09-25 14:03:55 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-09-25 14:03:55 -0400 |
commit | f9326a1996a665171c37e0f35a53e037c50666e8 (patch) | |
tree | 0304068ace06661ceed6e26ef66724906bd8493c /src/lib/Bcfg2/Client/Tools | |
parent | 161d5506f2dfe7da647c1c3fbf433ec9d18b3906 (diff) | |
download | bcfg2-f9326a1996a665171c37e0f35a53e037c50666e8.tar.gz bcfg2-f9326a1996a665171c37e0f35a53e037c50666e8.tar.bz2 bcfg2-f9326a1996a665171c37e0f35a53e037c50666e8.zip |
misc. minor bug fixes
Diffstat (limited to 'src/lib/Bcfg2/Client/Tools')
-rw-r--r-- | src/lib/Bcfg2/Client/Tools/POSIX/base.py | 11 |
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): |