From 3dafb1046d847783f1e761535925ea79d69d3305 Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Fri, 11 Oct 2013 08:55:45 -0400 Subject: [PATCH] Add deleteall customizations field for modules. Basically if a user asks to delete all module custmization, this will remove all disabled modules. --- policycoreutils/semanage/seobject.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/policycoreutils/semanage/seobject.py b/policycoreutils/semanage/seobject.py index 9b7b0a98..5dec339a 100644 --- a/policycoreutils/semanage/seobject.py +++ b/policycoreutils/semanage/seobject.py @@ -349,6 +349,11 @@ class moduleRecords(semanageRecords): self.commit() + def deleteall(self): + l = map(lambda x: x[0], filter(lambda t: t[2] == 0, self.get_all())) + for m in l: + self.enable(m) + class dontauditClass(semanageRecords): def __init__(self, store): semanageRecords.__init__(self, store)