-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Allow user to semange module -D which will remove all disabled modules. This patch looks good to me. acked. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlJpNgAACgkQrlYvE4MpobMVXQCeMTjSvVpcqzgDP62B+cQKox5W DLMAoIO3558tVE7yv2ltd6jIcdCRw/wH =wWqo -----END PGP SIGNATURE-----
>From 9328ac2909e29dc191aeac43d07d766487effd91 Mon Sep 17 00:00:00 2001 From: Dan Walsh <dwalsh@xxxxxxxxxx> Date: Fri, 11 Oct 2013 08:55:45 -0400 Subject: [PATCH 52/74] 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 6bd36ee..4c18810 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) -- 1.8.3.1