policycoreutils-2.7-6.fc27

- sepolicy: Initialize policy.ports as a dict in generate.py
- gui/polgengui.py: Use stop_emission_by_name instead of emit_stop_by_name
- Minor update for bash completion
- semodule_package: fix semodule_unpackage man page (#1334834)
- gui/semanagePage: Close "edit" and "add" dialogues when successfull
- gui/fcontextPage: Set default object class in addDialog
- semanage/seobject.py: Fix undefined store check (#1559174)
This commit is contained in:
Petr Lautrbach 2018-03-23 13:02:56 +01:00
parent 90862d2288
commit 9d9055ab45
3 changed files with 78 additions and 12 deletions

View File

@ -9,7 +9,7 @@
Summary: SELinux policy core utilities
Name: policycoreutils
Version: 2.7
Release: 5%{?dist}
Release: 6%{?dist}
License: GPLv2
Group: System Environment/Base
# https://github.com/SELinuxProject/selinux/wiki/Releases
@ -31,7 +31,7 @@ Source18: selinux-autorelabel.target
Source19: selinux-autorelabel-generator.sh
# download https://raw.githubusercontent.com/fedora-selinux/scripts/master/selinux/make-fedora-selinux-patch.sh
# run:
# HEAD https://github.com/fedora-selinux/selinux/commit/72e13edfb09ce2e73cfa6aaa15b26c3aed4e77e3
# HEAD https://github.com/fedora-selinux/selinux/commit/e4948158eef0365be17274825513dc824c5592e2
# $ for i in policycoreutils selinux-python selinux-gui selinux-sandbox selinux-dbus semodule-utils restorecond; do
# BRANCH=f27 VERSION=2.7 ./make-fedora-selinux-patch.sh $i
# done
@ -502,6 +502,15 @@ The policycoreutils-restorecond package contains the restorecond service.
%systemd_postun_with_restart restorecond.service
%changelog
* Fri Mar 23 2018 Petr Lautrbach <plautrba@redhat.com> - 2.7-6
- sepolicy: Initialize policy.ports as a dict in generate.py
- gui/polgengui.py: Use stop_emission_by_name instead of emit_stop_by_name
- Minor update for bash completion
- semodule_package: fix semodule_unpackage man page (#1334834)
- gui/semanagePage: Close "edit" and "add" dialogues when successfull
- gui/fcontextPage: Set default object class in addDialog
- semanage/seobject.py: Fix undefined store check (#1559174)
* Wed Feb 21 2018 Petr Lautrbach <plautrba@redhat.com> - 2.7-5
- Rewrite selinux-polgengui to use Gtk3
- Drop python2 and gnome-python2 from gui Requires

View File

@ -219,7 +219,7 @@ index 66f882a..bad5140 100644
p = store.get_value(iter, 1) == _("Permissive")
self.permissive_button.set_sensitive(not p)
diff --git selinux-gui-2.7/fcontextPage.py selinux-gui-2.7/fcontextPage.py
index 2e26666..a6577ef 100644
index 2e26666..370bbee 100644
--- selinux-gui-2.7/fcontextPage.py
+++ selinux-gui-2.7/fcontextPage.py
@@ -16,10 +16,7 @@
@ -288,7 +288,15 @@ index 2e26666..a6577ef 100644
def match(self, fcon_dict, k, filter):
try:
@@ -192,7 +189,7 @@ class fcontextPage(semanagePage):
@@ -167,6 +164,7 @@ class fcontextPage(semanagePage):
self.fcontextEntry.set_text("")
self.fcontextEntry.set_sensitive(True)
self.fcontextFileTypeCombo.set_sensitive(True)
+ self.fcontextFileTypeCombo.set_active(0)
self.fcontextTypeEntry.set_text("")
self.fcontextMLSEntry.set_text("s0")
@@ -192,7 +190,7 @@ class fcontextPage(semanagePage):
mls = self.fcontextMLSEntry.get_text().strip()
list_model = self.fcontextFileTypeCombo.get_model()
it = self.fcontextFileTypeCombo.get_active_iter()
@ -2913,7 +2921,7 @@ index 0000000..aa4c70a
+ </object>
+</interface>
diff --git selinux-gui-2.7/polgengui.py selinux-gui-2.7/polgengui.py
index 7460cce..cd73ea6 100644
index 7460cce..1601dbe 100644
--- selinux-gui-2.7/polgengui.py
+++ selinux-gui-2.7/polgengui.py
@@ -22,11 +22,11 @@
@ -3366,7 +3374,7 @@ index 7460cce..cd73ea6 100644
self.file_dialog.set_select_multiple(1)
self.__add(FILE)
@@ -599,71 +604,71 @@ class childWindow:
@@ -599,87 +604,87 @@ class childWindow:
self.file_dialog.set_title(_("Select directory(s) that the confined application owns and writes into"))
self.file_dialog.set_current_folder("/")
self.file_dialog.set_select_multiple(1)
@ -3479,7 +3487,12 @@ index 7460cce..cd73ea6 100644
return
self.output_entry.set_text(self.file_dialog.get_filename())
@@ -675,11 +680,11 @@ class childWindow:
def on_name_entry_changed(self, entry, text, size, position):
if text.find(" ") >= 0:
- entry.emit_stop_by_name("insert_text")
+ entry.stop_emission_by_name("insert-text")
def on_focus_out_event(self, entry, third):
name = entry.get_text()
if self.name != name:
if name in self.all_types:
@ -3638,7 +3651,7 @@ index b8fdaad..03179c5 100644
rec = "%s-%s" % k[:2]
self.store.set_value(iter, PORT_COL, rec)
diff --git selinux-gui-2.7/semanagePage.py selinux-gui-2.7/semanagePage.py
index 27367f3..560ec07 100644
index 27367f3..4127804 100644
--- selinux-gui-2.7/semanagePage.py
+++ selinux-gui-2.7/semanagePage.py
@@ -16,13 +16,8 @@
@ -3746,7 +3759,7 @@ index 27367f3..560ec07 100644
+ while self.dialog.run() == Gtk.ResponseType.OK:
try:
- if self.add() == False:
+ if not self.add():
+ if self.add() is False:
continue
break
except ValueError as e:
@ -3760,7 +3773,7 @@ index 27367f3..560ec07 100644
+ while self.dialog.run() == Gtk.ResponseType.OK:
try:
- if self.modify() == False:
+ if not self.modify():
+ if self.modify() is False:
continue
break
except ValueError as e:

View File

@ -265,6 +265,19 @@ index 313537c..8d8a086 100644
trans.finish()
diff --git selinux-python-2.7/semanage/semanage-bash-completion.sh selinux-python-2.7/semanage/semanage-bash-completion.sh
index 6b53292..2d811c9 100644
--- selinux-python-2.7/semanage/semanage-bash-completion.sh
+++ selinux-python-2.7/semanage/semanage-bash-completion.sh
@@ -59,7 +59,7 @@ __get_export_opts () { echo '$ALL_OPTS --f --output_file' ; }
__get_boolean_opts () { echo '$ALL_OPTS --on -off -1 -0' ; }
__get_user_opts () { echo '$ALL_OPTS $MANAGED_OPTS -L --level -r --range -R --role '; }
__get_login_opts () { echo '$ALL_OPTS $MANAGED_OPTS -s --seuser -r --range'; }
-__get_port_opts () { echo '$ALL_OPTS $MANAGED_OPTS -t -type -r --range -p --proto'; }
+__get_port_opts () { echo '$ALL_OPTS $MANAGED_OPTS -t --type -r --range -p --proto'; }
__get_interface_opts () { echo '$ALL_OPTS $MANAGED_OPTS -t --type '; }
__get_node_opts () { echo '$ALL_OPTS $MANAGED_OPTS -t --type -M --mask -p --proto'; }
__get_fcontext_opts () { echo '$ALL_OPTS $MANAGED_OPTS -t --type -e --equal -f --ftype '; }
diff --git selinux-python-2.7/semanage/semanage.8 selinux-python-2.7/semanage/semanage.8
index 0bdb90f..0cdcfcc 100644
--- selinux-python-2.7/semanage/semanage.8
@ -282,7 +295,7 @@ index 0bdb90f..0cdcfcc 100644
user identities to authorized role sets. In most cases, only the
former mapping needs to be adjusted by the administrator; the latter
diff --git selinux-python-2.7/semanage/seobject.py selinux-python-2.7/semanage/seobject.py
index 70fd192..dca9506 100644
index 70fd192..edf0221 100644
--- selinux-python-2.7/semanage/seobject.py
+++ selinux-python-2.7/semanage/seobject.py
@@ -238,20 +238,31 @@ class semanageRecords:
@ -593,6 +606,28 @@ index 70fd192..dca9506 100644
self.dict = {}
self.dict["TRUE"] = 1
self.dict["FALSE"] = 0
@@ -2644,7 +2665,7 @@ class booleanRecords(semanageRecords):
self.current_booleans = []
ptype = None
- if self.store is None or self.store == ptype:
+ if not self.store or self.store == ptype:
self.modify_local = True
else:
self.modify_local = False
diff --git selinux-python-2.7/sepolgen/src/sepolgen/policygen.py selinux-python-2.7/sepolgen/src/sepolgen/policygen.py
index 34c8401..ee664fb 100644
--- selinux-python-2.7/sepolgen/src/sepolgen/policygen.py
+++ selinux-python-2.7/sepolgen/src/sepolgen/policygen.py
@@ -77,7 +77,7 @@ class PolicyGenerator:
self.explain = NO_EXPLANATION
self.gen_requires = False
if module:
- self.moduel = module
+ self.module = module
else:
self.module = refpolicy.Module()
diff --git selinux-python-2.7/sepolicy/sepolicy.8 selinux-python-2.7/sepolicy/sepolicy.8
index 7900586..09d2b24 100644
--- selinux-python-2.7/sepolicy/sepolicy.8
@ -777,7 +812,7 @@ index 5cfc071..24e3526 100644
def reinit():
diff --git selinux-python-2.7/sepolicy/sepolicy/generate.py selinux-python-2.7/sepolicy/sepolicy/generate.py
index d68f96e..31aa968 100644
index d68f96e..71a1c92 100644
--- selinux-python-2.7/sepolicy/sepolicy/generate.py
+++ selinux-python-2.7/sepolicy/sepolicy/generate.py
@@ -110,7 +110,7 @@ def get_all_ports():
@ -789,6 +824,15 @@ index d68f96e..31aa968 100644
users.remove("system_u")
users.remove("root")
users.sort()
@@ -198,7 +198,7 @@ class policy:
def __init__(self, name, type):
self.rpms = []
- self.ports = []
+ self.ports = {}
self.all_roles = get_all_roles()
self.types = []
@@ -459,25 +459,25 @@ class policy:
self.out_udp = [all, False, False, verify_ports(ports)]