From 09e510adfa71985c6dec8fb501fa3b18b7b28649 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Tue, 18 Sep 2012 08:25:12 -0400 Subject: SEModules: fixed handling of module names again --- src/lib/Bcfg2/Client/Tools/SELinux.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/lib/Bcfg2/Client/Tools') 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 -- cgit v1.2.3-1-g7c22