policycoreutils: semanage: fix moduleRecords deleteall method
commit 2ff279e21e4715ac49e094b5fae8bc8e84b9e417 ("policycoreutils: semanage: update to new source policy infrastructure") introduced new methods for enabling/disabling modules but failed to update the deleteall method of class moduleRecords to use the new method. The deleteall method was introduced by commit 3dafb1046d847783f1e761535925ea79d69d3305 ("Add deleteall customizations field for modules.") as a way to re-enable all locally disabled modules. Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov> fedora-selinux/selinux.git: ab77906ea96a10bcbefee06ab7d32af853d4cf33 adffc5e277f5c5a99771439f793b7aa91be59f31
This commit is contained in:
parent
8274ef3855
commit
ebb9f41c51
@ -655671,9 +655671,22 @@ index 0fad36c..75b782f 100644
|
||||
mapping from Linux usernames (logins) to SELinux user identities,
|
||||
while the semanage user command deals with the mapping from SELinux
|
||||
user identities to authorized role sets. In most cases, only the
|
||||
diff --git a/policycoreutils-2.4/semanage/seobject.py b/policycoreutils-2.4/semanage/seobject.py
|
||||
index 568ebfd..306d9b7 100644
|
||||
--- a/policycoreutils-2.4/semanage/seobject.py
|
||||
+++ b/policycoreutils-2.4/semanage/seobject.py
|
||||
@@ -378,7 +378,7 @@ class moduleRecords(semanageRecords):
|
||||
def deleteall(self):
|
||||
l = map(lambda x: x[0], filter(lambda t: t[1] == 0, self.get_all()))
|
||||
for m in l:
|
||||
- self.enable(m)
|
||||
+ self.set_enabled(m, True)
|
||||
|
||||
class dontauditClass(semanageRecords):
|
||||
def __init__(self, store):
|
||||
diff --git a/policycoreutils-2.4/semanage/seobject/__init__.py b/policycoreutils-2.4/semanage/seobject/__init__.py
|
||||
new file mode 100644
|
||||
index 0000000..e3ac4c1
|
||||
index 0000000..ed984af
|
||||
--- /dev/null
|
||||
+++ b/policycoreutils-2.4/semanage/seobject/__init__.py
|
||||
@@ -0,0 +1,2251 @@
|
||||
@ -656073,7 +656086,7 @@ index 0000000..e3ac4c1
|
||||
+ def deleteall(self):
|
||||
+ l = [x[0] for x in [t for t in self.get_all() if t[1] == 0]]
|
||||
+ for m in l:
|
||||
+ self.enable(m)
|
||||
+ self.set_enabled(m, True)
|
||||
+
|
||||
+class dontauditClass(semanageRecords):
|
||||
+ def __init__(self, store):
|
||||
|
@ -18,7 +18,7 @@ Source2: policycoreutils_man_ru2.tar.bz2
|
||||
Source3: system-config-selinux.png
|
||||
Source4: sepolicy-icons.tgz
|
||||
# use make-rhat-patches.sh to create following patches from https://github.com/fedora-selinux/selinux/
|
||||
# HEAD https://github.com/fedora-selinux/selinux/commit/5f7664af80fa232f5c470a9c9bca13d40c950c32
|
||||
# HEAD https://github.com/fedora-selinux/selinux/commit/ab77906ea96a10bcbefee06ab7d32af853d4cf33
|
||||
Patch: policycoreutils-rhat.patch
|
||||
Patch1: sepolgen-rhat.patch
|
||||
Obsoletes: policycoreutils < 2.0.61-2
|
||||
|
Loading…
Reference in New Issue
Block a user