Skip to contentSkip to conversation

python/semanage: Remove redundant and broken moduleRecords.modify()

PATCH Applied Vit Mojzis 2 participants 2 messages Jan 11, 2018 – Jan 16, 2018 SELinux security module

lore
Share & tools
lore

Vit Mojzis

author
#0 lore raw

PATCH 1/1 python/semanage: Remove redundant and broken moduleRecords.modify()

moduleRecords.modify() calls nonexistent function semanage_module_update_file (maybe it should have been semanage_module_upgrade_file which is now obsolete and calls semanage_module_install_file) and the job of updating a module is done by moduleRecords.add().

---
 python/semanage/seobject.py | 5 -----
 1 file changed, 5 deletions(-)
python/semanage/seobject.py +0 -5
index b927b18..740bd7c 100644
@@ -423,11 +423,6 @@ class moduleRecords(semanageRecords):
                     raise ValueError(_("Could not disable module %s") % m)
         self.commit()
 
-    def modify(self, file):
-        rc = semanage_module_update_file(self.sh, file)
-        if rc >= 0:
-            self.commit()
-
     def delete(self, module, priority):
         rc = semanage_set_default_priority(self.sh, priority)
         if rc < 0:
Signature · 1 line
2.9.4
#1 lore raw
Quoted 8 lines · Vit Mojzis

moduleRecords.modify() calls nonexistent function semanage_module_update_file (maybe it should have been semanage_module_upgrade_file which is now obsolete and calls semanage_module_install_file) and the job of updating a module is done
by moduleRecords.add().

Thanks, applied.

Quoted 22 lines

---
 python/semanage/seobject.py | 5 -----

 1 file changed, 5 deletions(-)
python/semanage/seobject.py +0 -0
index b927b18..740bd7c 100644
@@ -423,11 +423,6 @@ class moduleRecords(semanageRecords):

                     raise ValueError(_("Could not disable module %s") % m)
         self.commit()

-    def modify(self, file):
-        rc = semanage_module_update_file(self.sh, file) -        if rc >= 0:
-            self.commit()
-
     def delete(self, module, priority):
         rc = semanage_set_default_priority(self.sh, priority) if rc < 0: