Fix some build problems in sepolicy manpage and sepolicy transition
This commit is contained in:
parent
d76fa39cad
commit
1cc95772be
@ -341594,10 +341594,10 @@ index 0000000..13d7a56
|
||||
+
|
||||
diff --git a/policycoreutils/sepolicy/sepolicy-generate.8 b/policycoreutils/sepolicy/sepolicy-generate.8
|
||||
new file mode 100644
|
||||
index 0000000..22876a0
|
||||
index 0000000..a592d85
|
||||
--- /dev/null
|
||||
+++ b/policycoreutils/sepolicy/sepolicy-generate.8
|
||||
@@ -0,0 +1,99 @@
|
||||
@@ -0,0 +1,106 @@
|
||||
+.TH "sepolicy-generate" "8" "20121005" "" ""
|
||||
+.SH "NAME"
|
||||
+sepolicy-generate \- Generate an initial SELinux policy module template.
|
||||
@ -341623,9 +341623,14 @@ index 0000000..22876a0
|
||||
+This file defines the default file context for the system, it takes the file types created in the te file and associates
|
||||
+file paths to the types. Tools like restorecon and RPM will use these paths to put down labels.
|
||||
+
|
||||
+.B RPM Spec File NAME_selinux.spec
|
||||
+.br
|
||||
+This file is an RPM SPEC file that can be used to install the SELinux policy on to machines and setup the labeling. The spec file also installs the interface file and a man page describing the policy. You can use sepolicy manpage -d NAME to generate the man page.
|
||||
+
|
||||
+.B Shell File NAME.sh
|
||||
+.br
|
||||
+This is a helper shell script to compile, install and fix the labeling on your test system.
|
||||
+This is a helper shell script to compile, install and fix the labeling on your test system. It will also generate a man page based on the installed policy, and
|
||||
+compile and build an RPM suitable to be installed on other machines
|
||||
+
|
||||
+If a generate is possible, this tool will print out all generate paths from the source domain to the target domain
|
||||
+
|
||||
@ -341676,7 +341681,7 @@ index 0000000..22876a0
|
||||
+Specify alternate name of policy. The policy will default to the executable or name specified.
|
||||
+
|
||||
+.SH "EXAMPLE"
|
||||
+.B sepolicy generate /usr/sbin/rwhod
|
||||
+.B > sepolicy generate /usr/sbin/rwhod
|
||||
+.br
|
||||
+Generating Policy for /usr/sbin/rwhod named rwhod
|
||||
+.br
|
||||
@ -341690,6 +341695,8 @@ index 0000000..22876a0
|
||||
+.br
|
||||
+rwhod.fc # File Contexts file
|
||||
+.br
|
||||
+rwhod_selinux.spec # Spec file
|
||||
+.br
|
||||
+rwhod.sh # Setup Script
|
||||
+
|
||||
+.SH "AUTHOR"
|
||||
@ -343679,10 +343686,10 @@ index 0000000..93b0762
|
||||
+ return out
|
||||
diff --git a/policycoreutils/sepolicy/sepolicy/manpage.py b/policycoreutils/sepolicy/sepolicy/manpage.py
|
||||
new file mode 100755
|
||||
index 0000000..94d89b2
|
||||
index 0000000..e3f9b70
|
||||
--- /dev/null
|
||||
+++ b/policycoreutils/sepolicy/sepolicy/manpage.py
|
||||
@@ -0,0 +1,1287 @@
|
||||
@@ -0,0 +1,1297 @@
|
||||
+#! /usr/bin/python -Es
|
||||
+# Copyright (C) 2012 Red Hat
|
||||
+# AUTHOR: Dan Walsh <dwalsh@redhat.com>
|
||||
@ -343717,8 +343724,9 @@ index 0000000..94d89b2
|
||||
+import commands
|
||||
+import sys, os, re, time
|
||||
+
|
||||
+equiv_dict={ "smbd" : ( "samba" ), "httpd" : ( "apache" ), "virtd" : ( "virt", "libvirtd" ) }
|
||||
+equiv_dict={ "smbd" : ( "samba" ), "httpd" : ( "apache" ), "virtd" : ( "virt", "libvirt" ) }
|
||||
+
|
||||
+modules_dict = None
|
||||
+def _gen_modules_dict():
|
||||
+ import xml.etree.ElementTree
|
||||
+ modules_dict = {}
|
||||
@ -343738,7 +343746,6 @@ index 0000000..94d89b2
|
||||
+ except IOError, e:
|
||||
+ pass
|
||||
+ return modules_dict
|
||||
+modules_dict = _gen_modules_dict()
|
||||
+
|
||||
+all_attributes = map(lambda x: x['name'], sepolicy.info(sepolicy.ATTRIBUTE))
|
||||
+entrypoints = sepolicy.info(sepolicy.ATTRIBUTE,"entry_type")[0]["types"]
|
||||
@ -344139,10 +344146,17 @@ index 0000000..94d89b2
|
||||
+ def __init__(self, domainname, path = "/tmp", html = False):
|
||||
+ self.html = html
|
||||
+ self.path = path
|
||||
+ if domainname.endswith("_t"):
|
||||
+ self.domainname = domainname[:-2]
|
||||
+ else:
|
||||
+ self.domainname = domainname
|
||||
+ self.short_name = domainname
|
||||
+
|
||||
+ if self.domainname + "_t" not in alldomains:
|
||||
+ raise ValueError("domain %s_t does not exist" % self.domainname)
|
||||
+ self.short_name = self.domainname
|
||||
+
|
||||
+ self.type = self.domainname + "_t"
|
||||
+ self.man_page_path = "%s/%s_selinux.8" % (path, domainname)
|
||||
+ self.man_page_path = "%s/%s_selinux.8" % (path, self.domainname)
|
||||
+ self.fd = open(self.man_page_path, 'w')
|
||||
+ if domainname in roles:
|
||||
+ self.__gen_user_man_page()
|
||||
@ -344164,6 +344178,9 @@ index 0000000..94d89b2
|
||||
+
|
||||
+ def __gen_user_man_page(self):
|
||||
+ self.role = self.domainname + "_r"
|
||||
+ global modules_dict
|
||||
+ if not modules_dict:
|
||||
+ modules_dict = _gen_modules_dict()
|
||||
+
|
||||
+ try:
|
||||
+ self.desc = modules_dict[self.domainname]
|
||||
@ -347419,10 +347436,10 @@ index 0000000..dccb5f1
|
||||
+"""
|
||||
diff --git a/policycoreutils/sepolicy/sepolicy/transition.py b/policycoreutils/sepolicy/sepolicy/transition.py
|
||||
new file mode 100755
|
||||
index 0000000..72f5f65
|
||||
index 0000000..90ca85f
|
||||
--- /dev/null
|
||||
+++ b/policycoreutils/sepolicy/sepolicy/transition.py
|
||||
@@ -0,0 +1,71 @@
|
||||
@@ -0,0 +1,72 @@
|
||||
+#! /usr/bin/python -Es
|
||||
+# Copyright (C) 2011 Red Hat
|
||||
+# see file 'COPYING' for use and warranty information
|
||||
@ -347476,6 +347493,7 @@ index 0000000..72f5f65
|
||||
+
|
||||
+ if not dest:
|
||||
+ for t in targets:
|
||||
+ if len(_entrypoint(t)):
|
||||
+ slist.append((src, _entrypoint(t)[0], t))
|
||||
+ return True
|
||||
+
|
||||
|
@ -7,7 +7,7 @@
|
||||
Summary: SELinux policy core utilities
|
||||
Name: policycoreutils
|
||||
Version: 2.1.13
|
||||
Release: 22%{?dist}
|
||||
Release: 23%{?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 Nov 1 2012 Dan Walsh <dwalsh@redhat.com> - 2.1.12-23
|
||||
- Fix some build problems in sepolicy manpage and sepolicy transition
|
||||
|
||||
* Tue Oct 30 2012 Dan Walsh <dwalsh@redhat.com> - 2.1.12-22
|
||||
- Add alias man pages to sepolicy manpage
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user