-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This patch allows semanage module to list modules you disabled. We use this info when extracting customizations via semanage extract command, which can then be used on a different platform. 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/ iEYEARECAAYFAlJpNZwACgkQrlYvE4MpobNwcwCfVrvkdrtafhUEVqdz+U7foXYS LmsAoNFQd+qjDCK4oWBRCfujn0fq1XPf =gdI+ -----END PGP SIGNATURE-----
>From 9f270c4a57b60e5d880d9f29e3fc8b6a0c240c39 Mon Sep 17 00:00:00 2001 From: Dan Walsh <dwalsh@xxxxxxxxxx> Date: Fri, 11 Oct 2013 08:51:47 -0400 Subject: [PATCH 49/74] Add customized calls for modules to list disabled modules --- policycoreutils/semanage/seobject.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/policycoreutils/semanage/seobject.py b/policycoreutils/semanage/seobject.py index 511daec..72dd67b 100644 --- a/policycoreutils/semanage/seobject.py +++ b/policycoreutils/semanage/seobject.py @@ -285,6 +285,12 @@ class moduleRecords(semanageRecords): l.append((semanage_module_get_name(mod), semanage_module_get_version(mod), semanage_module_get_enabled(mod))) return l + def customized(self): + all = self.get_all() + if len(all) == 0: + return + return map(lambda x: "-d %s" % x[0], filter(lambda t: t[2] == 0, all)) + def list(self, heading = 1, locallist = 0): all = self.get_all() if len(all) == 0: -- 1.8.3.1