diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-09-18 08:25:12 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-09-18 08:25:12 -0400 |
commit | 09e510adfa71985c6dec8fb501fa3b18b7b28649 (patch) | |
tree | 5adbe1b7cad769d11febadfaa6844f9cd5da6f42 /src/lib/Bcfg2/Client/Tools | |
parent | 3ab678e7fcff5dc5537e8518f5b76e83da9338b7 (diff) | |
download | bcfg2-09e510adfa71985c6dec8fb501fa3b18b7b28649.tar.gz bcfg2-09e510adfa71985c6dec8fb501fa3b18b7b28649.tar.bz2 bcfg2-09e510adfa71985c6dec8fb501fa3b18b7b28649.zip |
SEModules: fixed handling of module names again
Diffstat (limited to 'src/lib/Bcfg2/Client/Tools')
-rw-r--r-- | src/lib/Bcfg2/Client/Tools/SELinux.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/lib/Bcfg2/Client/Tools/SELinux.py b/src/lib/Bcfg2/Client/Tools/SELinux.py index f060a1374..babdaf6bf 100644 --- a/src/lib/Bcfg2/Client/Tools/SELinux.py +++ b/src/lib/Bcfg2/Client/Tools/SELinux.py @@ -703,14 +703,8 @@ class SELinuxModuleHandler(SELinuxEntryHandler): return rv def _filepath(self, entry): - path = os.path.join("/usr/share/selinux", self.setype, - entry.get("name").lstrip("/")) - if not path.endswith(".pp"): - # the entry name we get from the SEModules plugin should - # always have .pp on the end, but we double check just to - # make absolutely certain - path = path + ".pp" - return path + return os.path.join("/usr/share/selinux", self.setype, + entry.get("name") + '.pp') def _pathentry(self, entry): pathentry = copy.deepcopy(entry) @@ -737,7 +731,7 @@ class SELinuxModuleHandler(SELinuxEntryHandler): try: # if seobject has the moduleRecords attribute, install the # module using the seobject library - self.records + self.records # pylint: disable=W0104 return self._install_seobject(entry) except AttributeError: # seobject doesn't have the moduleRecords attribute, so |