From 4a63d324194223d5b9623ec503eb874d54da0107 Mon Sep 17 00:00:00 2001 From: rhatdan Date: Thu, 25 Oct 2012 14:20:27 -0400 Subject: [PATCH] Fix semanage boolean -F to handle boolean subs --- policycoreutils-rhat.patch | 20 +++++++++++++++++++- policycoreutils.spec | 5 ++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/policycoreutils-rhat.patch b/policycoreutils-rhat.patch index a73d7f4..fed6154 100644 --- a/policycoreutils-rhat.patch +++ b/policycoreutils-rhat.patch @@ -335732,7 +335732,7 @@ index f4602a9..61d455c 100644 except IOError: import __builtin__ diff --git a/policycoreutils/semanage/seobject.py b/policycoreutils/semanage/seobject.py -index ad7dc8c..b4abd67 100644 +index ad7dc8c..0a1485e 100644 --- a/policycoreutils/semanage/seobject.py +++ b/policycoreutils/semanage/seobject.py @@ -24,17 +24,18 @@ @@ -335949,6 +335949,24 @@ index ad7dc8c..b4abd67 100644 self.validate(target) (rc, k) = semanage_fcontext_key_create(self.sh, target, file_types[ftype]) +@@ -1999,6 +1998,8 @@ class booleanRecords(semanageRecords): + self.modify_local = False + + def __mod(self, name, value): ++ name = selinux.selinux_boolean_sub(name) ++ + (rc, k) = semanage_bool_key_create(self.sh, name) + if rc < 0: + raise ValueError(_("Could not create a key for %s") % name) +@@ -2028,8 +2029,6 @@ class booleanRecords(semanageRecords): + semanage_bool_free(b) + + def modify(self, name, value = None, use_file = False): +- name = selinux.selinux_boolean_sub(name) +- + self.begin() + if use_file: + fd = open(name) diff --git a/policycoreutils/sepolicy/.gitignore b/policycoreutils/sepolicy/.gitignore new file mode 100644 index 0000000..378eac2 diff --git a/policycoreutils.spec b/policycoreutils.spec index 50b4c0c..7006fe3 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -7,7 +7,7 @@ Summary: SELinux policy core utilities Name: policycoreutils Version: 2.1.13 -Release: 16%{?dist} +Release: 17%{?dist} License: GPLv2 Group: System Environment/Base # Based on git repository with tag 20101221 @@ -329,6 +329,9 @@ The policycoreutils-restorecond package contains the restorecond service. %{_bindir}/systemctl try-restart restorecond.service >/dev/null 2>&1 || : %changelog +* Thu Oct 25 2012 Dan Walsh - 2.1.12-17 +- Fix semanage boolean -F to handle boolean subs + * Thu Oct 25 2012 Dan Walsh - 2.1.12-16 - Add Miroslav Grepl patch to generate html man pages - Update Translations