policycoreutils-2.6-4

- Fix selinux-polgengui (#1432337)
- sepolicy - fix obtaining domain name in HTMLManPages
This commit is contained in:
Petr Lautrbach 2017-03-17 16:11:06 +01:00
parent c12014f9e3
commit 469f6b64e9
2 changed files with 69 additions and 6 deletions

View File

@ -1,8 +1,18 @@
diff --git policycoreutils-2.6/gui/polgengui.py policycoreutils-2.6/gui/polgengui.py
index 1d262a9..7460cce 100644
index 1d262a9..064001b 100644
--- policycoreutils-2.6/gui/polgengui.py
+++ policycoreutils-2.6/gui/polgengui.py
@@ -679,7 +679,7 @@ class childWindow:
@@ -34,7 +34,9 @@ except ValueError as e:
sys.stderr.write("%s: %s\n" % (e.__class__.__name__, str(e)))
sys.exit(1)
+import sepolicy.generate
import sepolicy.interface
+
try:
from subprocess import getstatusoutput
except ImportError:
@@ -679,7 +681,7 @@ class childWindow:
entry.set_text("")
return False
if name in self.all_modules:
@ -11,6 +21,27 @@ index 1d262a9..7460cce 100644
entry.set_text("")
return False
@@ -696,16 +698,16 @@ class childWindow:
def on_in_net_page_next(self, *args):
try:
- generate.verify_ports(self.in_tcp_entry.get_text())
- generate.verify_ports(self.in_udp_entry.get_text())
+ sepolicy.generate.verify_ports(self.in_tcp_entry.get_text())
+ sepolicy.generate.verify_ports(self.in_udp_entry.get_text())
except ValueError as e:
self.error(e.message)
return True
def on_out_net_page_next(self, *args):
try:
- generate.verify_ports(self.out_tcp_entry.get_text())
- generate.verify_ports(self.out_udp_entry.get_text())
+ sepolicy.generate.verify_ports(self.out_tcp_entry.get_text())
+ sepolicy.generate.verify_ports(self.out_udp_entry.get_text())
except ValueError as e:
self.error(e.message)
return True
diff --git policycoreutils-2.6/hll/pp/pp.c policycoreutils-2.6/hll/pp/pp.c
index 2c9f53f..7f9afb0 100644
--- policycoreutils-2.6/hll/pp/pp.c
@ -1048,7 +1079,7 @@ index c2cb971..8956f39 100644
sys.stderr.write(output)
sys.stderr.write(_("\nCompile test for %s failed.\n") % interface)
diff --git policycoreutils-2.6/sepolicy/sepolicy/manpage.py policycoreutils-2.6/sepolicy/sepolicy/manpage.py
index 7365f93..5103272 100755
index 7365f93..703cce2 100755
--- policycoreutils-2.6/sepolicy/sepolicy/manpage.py
+++ policycoreutils-2.6/sepolicy/sepolicy/manpage.py
@@ -27,11 +27,17 @@ __all__ = ['ManPage', 'HTMLManPages', 'manpage_domains', 'manpage_roles', 'gen_d
@ -1172,8 +1203,18 @@ index 7365f93..5103272 100755
self._gen_css()
def _write_html_manpage(self):
@@ -210,67 +239,21 @@ class HTMLManPages:
convert_manpage_to_html((self.new_path + r.split("_selinux")[0] + ".html"), self.old_path + r)
@@ -202,75 +231,29 @@ class HTMLManPages:
for domain in self.manpage_domains.values():
if len(domain):
for d in domain:
- convert_manpage_to_html((self.new_path + d.split("_selinux")[0] + ".html"), self.old_path + d)
+ convert_manpage_to_html((self.new_path + d.rsplit("_selinux", 1)[0] + ".html"), self.old_path + d)
for role in self.manpage_roles.values():
if len(role):
for r in role:
- convert_manpage_to_html((self.new_path + r.split("_selinux")[0] + ".html"), self.old_path + r)
+ convert_manpage_to_html((self.new_path + r.rsplit("_selinux", 1)[0] + ".html"), self.old_path + r)
def _gen_index(self):
- index = self.old_path + "index.html"
@ -1244,6 +1285,24 @@ index 7365f93..5103272 100755
for letter in self.manpage_roles:
if len(self.manpage_roles[letter]):
fd.write("""
@@ -287,7 +270,7 @@ Fedora or Red Hat Enterprise Linux Man Pages.</h2>
if len(self.manpage_roles[letter]):
rolename_body += "<p>"
for r in self.manpage_roles[letter]:
- rolename = r.split("_selinux")[0]
+ rolename = r.rsplit("_selinux", 1)[0]
rolename_body += "<a name=%s_role></a><a href=%s.html>%s_selinux(8)</a> - Security Enhanced Linux Policy for the %s SELinux user\n" % (letter, rolename, rolename, rolename)
fd.write("""%s
@@ -314,7 +297,7 @@ Fedora or Red Hat Enterprise Linux Man Pages.</h2>
if len(self.manpage_domains[letter]):
domainname_body += "<p>"
for r in self.manpage_domains[letter]:
- domainname = r.split("_selinux")[0]
+ domainname = r.rsplit("_selinux", 1)[0]
domainname_body += "<a name=%s_domain></a><a href=%s.html>%s_selinux(8)</a> - Security Enhanced Linux Policy for the %s SELinux processes\n" % (letter, domainname, domainname, domainname)
fd.write("""%s
@@ -414,6 +397,9 @@ class ManPage:
self.all_file_types = sepolicy.get_all_file_types()
self.role_allows = sepolicy.get_all_role_allows()

View File

@ -9,7 +9,7 @@
Summary: SELinux policy core utilities
Name: policycoreutils
Version: 2.6
Release: 3%{?dist}
Release: 4%{?dist}
License: GPLv2
Group: System Environment/Base
# https://github.com/SELinuxProject/selinux/wiki/Releases
@ -445,6 +445,10 @@ The policycoreutils-restorecond package contains the restorecond service.
%systemd_postun_with_restart restorecond.service
%changelog
* Fri Mar 17 2017 Petr Lautrbach <plautrba@redhat.com> - 2.6-4
- Fix selinux-polgengui (#1432337)
- sepolicy - fix obtaining domain name in HTMLManPages
* Tue Feb 28 2017 Petr Lautrbach <plautrba@redhat.com> - 2.6-3
- Fix several issues in gui and 'sepolicy manpage' (#1416372)