rpms/policycoreutils/F-9 .cvsignore, 1.179, 1.180 policycoreutils-gui.patch, 1.64, 1.65 policycoreutils-rhat.patch, 1.365, 1.366 policycoreutils-sepolgen.patch, 1.10, 1.11 policycoreutils.spec, 1.523, 1.524

Daniel J Walsh (dwalsh) fedora-extras-commits at redhat.com
Sun Jun 22 13:35:39 UTC 2008


Author: dwalsh

Update of /cvs/extras/rpms/policycoreutils/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25739

Modified Files:
	.cvsignore policycoreutils-gui.patch 
	policycoreutils-rhat.patch policycoreutils-sepolgen.patch 
	policycoreutils.spec 
Log Message:
* Mon Jun 16 2008 Dan Walsh <dwalsh at redhat.com> 2.0.49-7
- Fix sepolgen-ifgen processing



Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/policycoreutils/F-9/.cvsignore,v
retrieving revision 1.179
retrieving revision 1.180
diff -u -r1.179 -r1.180
--- .cvsignore	30 Apr 2008 18:54:33 -0000	1.179
+++ .cvsignore	22 Jun 2008 13:34:48 -0000	1.180
@@ -178,3 +178,4 @@
 policycoreutils-2.0.44.tgz
 policycoreutils-2.0.46.tgz
 policycoreutils-2.0.47.tgz
+policycoreutils-2.0.49.tgz

policycoreutils-gui.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.64 -r 1.65 policycoreutils-gui.patch
Index: policycoreutils-gui.patch
===================================================================
RCS file: /cvs/extras/rpms/policycoreutils/F-9/policycoreutils-gui.patch,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- policycoreutils-gui.patch	22 May 2008 18:08:33 -0000	1.64
+++ policycoreutils-gui.patch	22 Jun 2008 13:34:48 -0000	1.65
@@ -1,6 +1,44 @@
+diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/Makefile policycoreutils-2.0.49/gui/Makefile
+--- nsapolicycoreutils/gui/Makefile	1969-12-31 19:00:00.000000000 -0500
++++ policycoreutils-2.0.49/gui/Makefile	2008-06-12 23:37:37.000000000 -0400
+@@ -0,0 +1,34 @@
++# Installation directories.
++PREFIX ?= ${DESTDIR}/usr
++SHAREDIR ?= $(PREFIX)/share/system-config-selinux
++
++TARGETS= \
++booleansPage.py \
++fcontextPage.py \
++loginsPage.py \
++mappingsPage.py \
++modulesPage.py \
++polgen.py \
++polgen.glade \
++portsPage.py \
++semanagePage.py \
++statusPage.py \
++system-config-selinux.glade \
++translationsPage.py \
++usersPage.py \
++selinux.tbl
++
++all: $(TARGETS) system-config-selinux.py polgengui.py templates
++
++install: all
++	-mkdir -p $(SHAREDIR)/templates
++	install -m 755 system-config-selinux.py $(SHAREDIR)
++	install -m 755 polgengui.py $(SHAREDIR)
++	install -m 644 $(TARGETS) $(SHAREDIR)
++	install -m 644 templates/*.py $(SHAREDIR)/templates/
++
++clean:
++
++indent:
++
++relabel:
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/booleansPage.py policycoreutils-2.0.49/gui/booleansPage.py
 --- nsapolicycoreutils/gui/booleansPage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.49/gui/booleansPage.py	2008-05-16 12:09:21.000000000 -0400
++++ policycoreutils-2.0.49/gui/booleansPage.py	2008-06-12 23:37:37.000000000 -0400
 @@ -0,0 +1,230 @@
 +#
 +# booleansPage.py - GUI for Booleans page in system-config-securitylevel
@@ -234,7 +272,7 @@
 +        
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/fcontextPage.py policycoreutils-2.0.49/gui/fcontextPage.py
 --- nsapolicycoreutils/gui/fcontextPage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.49/gui/fcontextPage.py	2008-05-16 12:09:21.000000000 -0400
++++ policycoreutils-2.0.49/gui/fcontextPage.py	2008-06-12 23:37:37.000000000 -0400
 @@ -0,0 +1,217 @@
 +## fcontextPage.py - show selinux mappings
 +## Copyright (C) 2006 Red Hat, Inc.
@@ -453,178 +491,10 @@
 +        self.store.set_value(iter, SPEC_COL, fspec)
 +        self.store.set_value(iter, FTYPE_COL, ftype)
 +        self.store.set_value(iter, TYPE_COL, "%s:%s" % (type, mls))
-diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/html_util.py policycoreutils-2.0.49/gui/html_util.py
---- nsapolicycoreutils/gui/html_util.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.49/gui/html_util.py	2008-05-16 12:16:25.000000000 -0400
-@@ -0,0 +1,164 @@
-+# Authors: John Dennis <jdennis at redhat.com>
-+#
-+# Copyright (C) 2007 Red Hat, Inc.
-+#
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 2 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-+#
-+
-+
-+__all__ = [
-+    'escape_html',
-+    'unescape_html',
-+    'html_to_text',
-+
-+    'html_document',
-+]
-+
-+import htmllib
-+import formatter as Formatter
-+import string
-+from types import *
-+import StringIO
-+
-+#------------------------------------------------------------------------------
-+
-+class TextWriter(Formatter.DumbWriter):
-+    def __init__(self, file=None, maxcol=80, indent_width=4):
-+        Formatter.DumbWriter.__init__(self, file, maxcol)
-+        self.indent_level = 0
-+        self.indent_width = indent_width
-+        self._set_indent()
-+
-+    def _set_indent(self):
-+        self.indent_col = self.indent_level * self.indent_width
-+        self.indent = ' ' * self.indent_col
-+
-+    def new_margin(self, margin, level):
-+        self.indent_level = level
-+        self._set_indent()
-+
-+    def send_label_data(self, data):
-+        data = data + ' '
-+        if len(data) > self.indent_col:
-+            self.send_literal_data(data)
-+        else:
-+            offset = self.indent_col - len(data)
-+            self.send_literal_data(' ' * offset + data)
-+
-+    def send_flowing_data(self, data):
-+        if not data: return
-+        atbreak = self.atbreak or data[0] in string.whitespace
-+        col = self.col
-+        maxcol = self.maxcol
-+        write = self.file.write
-+        col = self.col
-+        if col == 0:
-+            write(self.indent)
-+            col = self.indent_col
-+        for word in data.split():
-+            if atbreak:
-+                if col + len(word) >= maxcol:
-+                    write('\n' + self.indent)
-+                    col = self.indent_col
-+                else:
-+                    write(' ')
-+                    col = col + 1
-+            write(word)
-+            col = col + len(word)
-+            atbreak = 1
-+        self.col = col
-+        self.atbreak = data[-1] in string.whitespace
-+            
-+class HTMLParserAnchor(htmllib.HTMLParser):
-+
-+    def __init__(self, formatter, verbose=0):
-+        htmllib.HTMLParser.__init__(self, formatter, verbose)
-+
-+    def anchor_bgn(self, href, name, type):
-+        self.anchor = href
-+
-+    def anchor_end(self):
-+        if self.anchor:
-+            self.handle_data(' (%s) ' % self.anchor)
-+            self.anchor = None
-+
-+#------------------------------------------------------------------------------
-+
-+def escape_html(s):
-+    if s is None: return None
-+    s = s.replace("&", "&") # Must be done first!
-+    s = s.replace("<", "<")
-+    s = s.replace(">", ">")
-+    s = s.replace("'", "'")
-+    s = s.replace('"', """)
-+    return s
-+
-+
-+def unescape_html(s):
-+    if s is None: return None
-+    if '&' not in s:
-+        return s
-+    s = s.replace("<", "<")
-+    s = s.replace(">", ">")
-+    s = s.replace("'", "'")
-+    s = s.replace(""", '"')
-+    s = s.replace("&", "&") # Must be last
-+    return s
-+
-+def html_to_text(html, maxcol=80):
-+    try:
-+        buffer = StringIO.StringIO()
-+        formatter = Formatter.AbstractFormatter(TextWriter(buffer, maxcol))
-+        parser = HTMLParserAnchor(formatter)
-+        parser.feed(html)
-+        parser.close()
-+        text = buffer.getvalue()
-+        buffer.close()
-+        return text
[...7515 lines suppressed...]
 +    app = childWindow()
 +    app.stand_alone()
+diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/__init__.py policycoreutils-2.0.49/gui/templates/__init__.py
+--- nsapolicycoreutils/gui/templates/__init__.py	1969-12-31 19:00:00.000000000 -0500
++++ policycoreutils-2.0.49/gui/templates/__init__.py	2008-06-12 23:37:37.000000000 -0400
+@@ -0,0 +1,18 @@
++#
++# Copyright (C) 2007 Red Hat, Inc.
++#
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++#
++
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/boolean.py policycoreutils-2.0.49/gui/templates/boolean.py
 --- nsapolicycoreutils/gui/templates/boolean.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.49/gui/templates/boolean.py	2008-05-16 12:09:21.000000000 -0400
++++ policycoreutils-2.0.49/gui/templates/boolean.py	2008-06-12 23:37:37.000000000 -0400
 @@ -0,0 +1,40 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -11277,7 +14611,7 @@
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/etc_rw.py policycoreutils-2.0.49/gui/templates/etc_rw.py
 --- nsapolicycoreutils/gui/templates/etc_rw.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.49/gui/templates/etc_rw.py	2008-05-16 12:09:21.000000000 -0400
++++ policycoreutils-2.0.49/gui/templates/etc_rw.py	2008-06-12 23:37:37.000000000 -0400
 @@ -0,0 +1,129 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -11410,8 +14744,8 @@
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/executable.py policycoreutils-2.0.49/gui/templates/executable.py
 --- nsapolicycoreutils/gui/templates/executable.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.49/gui/templates/executable.py	2008-05-16 12:09:21.000000000 -0400
-@@ -0,0 +1,328 @@
++++ policycoreutils-2.0.49/gui/templates/executable.py	2008-06-22 09:31:21.000000000 -0400
+@@ -0,0 +1,327 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
 +#
@@ -11444,7 +14778,6 @@
 +
 +type TEMPLATETYPE_t;
 +type TEMPLATETYPE_exec_t;
-+domain_type(TEMPLATETYPE_t)
 +init_daemon_domain(TEMPLATETYPE_t, TEMPLATETYPE_exec_t)
 +"""
 +
@@ -11740,31 +15073,9 @@
 +EXECUTABLE	--	gen_context(system_u:object_r:TEMPLATETYPE_script_exec_t,s0)
 +"""
 +
-diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/__init__.py policycoreutils-2.0.49/gui/templates/__init__.py
---- nsapolicycoreutils/gui/templates/__init__.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.49/gui/templates/__init__.py	2008-05-16 12:09:21.000000000 -0400
-@@ -0,0 +1,18 @@
-+#
-+# Copyright (C) 2007 Red Hat, Inc.
-+#
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 2 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-+#
-+
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/network.py policycoreutils-2.0.49/gui/templates/network.py
 --- nsapolicycoreutils/gui/templates/network.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.49/gui/templates/network.py	2008-05-16 12:09:21.000000000 -0400
++++ policycoreutils-2.0.49/gui/templates/network.py	2008-06-12 23:37:37.000000000 -0400
 @@ -0,0 +1,80 @@
 +te_port_types="""
 +type TEMPLATETYPE_port_t;
@@ -11848,7 +15159,7 @@
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/rw.py policycoreutils-2.0.49/gui/templates/rw.py
 --- nsapolicycoreutils/gui/templates/rw.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.49/gui/templates/rw.py	2008-05-16 12:09:21.000000000 -0400
++++ policycoreutils-2.0.49/gui/templates/rw.py	2008-06-12 23:37:37.000000000 -0400
 @@ -0,0 +1,128 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -11980,7 +15291,7 @@
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/script.py policycoreutils-2.0.49/gui/templates/script.py
 --- nsapolicycoreutils/gui/templates/script.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.49/gui/templates/script.py	2008-05-16 12:09:21.000000000 -0400
++++ policycoreutils-2.0.49/gui/templates/script.py	2008-06-12 23:37:37.000000000 -0400
 @@ -0,0 +1,105 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -12089,7 +15400,7 @@
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/semodule.py policycoreutils-2.0.49/gui/templates/semodule.py
 --- nsapolicycoreutils/gui/templates/semodule.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.49/gui/templates/semodule.py	2008-05-16 12:09:21.000000000 -0400
++++ policycoreutils-2.0.49/gui/templates/semodule.py	2008-06-12 23:37:37.000000000 -0400
 @@ -0,0 +1,41 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -12134,7 +15445,7 @@
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/tmp.py policycoreutils-2.0.49/gui/templates/tmp.py
 --- nsapolicycoreutils/gui/templates/tmp.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.49/gui/templates/tmp.py	2008-05-16 12:09:21.000000000 -0400
++++ policycoreutils-2.0.49/gui/templates/tmp.py	2008-06-12 23:37:37.000000000 -0400
 @@ -0,0 +1,97 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -12235,7 +15546,7 @@
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/user.py policycoreutils-2.0.49/gui/templates/user.py
 --- nsapolicycoreutils/gui/templates/user.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.49/gui/templates/user.py	2008-05-16 12:09:21.000000000 -0400
++++ policycoreutils-2.0.49/gui/templates/user.py	2008-06-12 23:37:37.000000000 -0400
 @@ -0,0 +1,182 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -12421,7 +15732,7 @@
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_lib.py policycoreutils-2.0.49/gui/templates/var_lib.py
 --- nsapolicycoreutils/gui/templates/var_lib.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.49/gui/templates/var_lib.py	2008-05-16 12:09:21.000000000 -0400
++++ policycoreutils-2.0.49/gui/templates/var_lib.py	2008-06-12 23:37:37.000000000 -0400
 @@ -0,0 +1,158 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -12583,7 +15894,7 @@
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_log.py policycoreutils-2.0.49/gui/templates/var_log.py
 --- nsapolicycoreutils/gui/templates/var_log.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.49/gui/templates/var_log.py	2008-05-16 12:09:21.000000000 -0400
++++ policycoreutils-2.0.49/gui/templates/var_log.py	2008-06-12 23:37:37.000000000 -0400
 @@ -0,0 +1,110 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -12697,7 +16008,7 @@
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_run.py policycoreutils-2.0.49/gui/templates/var_run.py
 --- nsapolicycoreutils/gui/templates/var_run.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.49/gui/templates/var_run.py	2008-05-16 12:09:21.000000000 -0400
++++ policycoreutils-2.0.49/gui/templates/var_run.py	2008-06-12 23:37:37.000000000 -0400
 @@ -0,0 +1,118 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -12819,7 +16130,7 @@
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_spool.py policycoreutils-2.0.49/gui/templates/var_spool.py
 --- nsapolicycoreutils/gui/templates/var_spool.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.49/gui/templates/var_spool.py	2008-05-16 12:09:21.000000000 -0400
++++ policycoreutils-2.0.49/gui/templates/var_spool.py	2008-06-22 09:30:55.000000000 -0400
 @@ -0,0 +1,129 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -12852,7 +16163,7 @@
 +te_rules="""
 +allow TEMPLATETYPE_t TEMPLATETYPE_spool_t:dir manage_dir_perms;
 +allow TEMPLATETYPE_t TEMPLATETYPE_spool_t:file manage_file_perms;
-+allow TEMPLATETYPE_t TEMPLATETYPE_spool_t:sock_file create_file_perms;
++allow TEMPLATETYPE_t TEMPLATETYPE_spool_t:sock_file manage_sock_file_perms;
 +files_spool_filetrans(TEMPLATETYPE_t,TEMPLATETYPE_spool_t, { file dir sock_file })
 +"""
 +
@@ -12952,7 +16263,7 @@
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/translationsPage.py policycoreutils-2.0.49/gui/translationsPage.py
 --- nsapolicycoreutils/gui/translationsPage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.49/gui/translationsPage.py	2008-05-16 12:09:21.000000000 -0400
++++ policycoreutils-2.0.49/gui/translationsPage.py	2008-06-12 23:37:37.000000000 -0400
 @@ -0,0 +1,118 @@
 +## translationsPage.py - show selinux translations
 +## Copyright (C) 2006 Red Hat, Inc.
@@ -13074,7 +16385,7 @@
 +        self.store.set_value(iter, 1, translation)
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/usersPage.py policycoreutils-2.0.49/gui/usersPage.py
 --- nsapolicycoreutils/gui/usersPage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.49/gui/usersPage.py	2008-05-16 12:09:21.000000000 -0400
++++ policycoreutils-2.0.49/gui/usersPage.py	2008-06-12 23:37:37.000000000 -0400
 @@ -0,0 +1,150 @@
 +## usersPage.py - show selinux mappings
 +## Copyright (C) 2006,2007,2008 Red Hat, Inc.

policycoreutils-rhat.patch:

Index: policycoreutils-rhat.patch
===================================================================
RCS file: /cvs/extras/rpms/policycoreutils/F-9/policycoreutils-rhat.patch,v
retrieving revision 1.365
retrieving revision 1.366
diff -u -r1.365 -r1.366
--- policycoreutils-rhat.patch	22 May 2008 18:08:33 -0000	1.365
+++ policycoreutils-rhat.patch	22 Jun 2008 13:34:48 -0000	1.366
@@ -1,5 +1,5 @@
 diff --exclude-from=exclude --exclude=sepolgen-1.0.11 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/Makefile policycoreutils-2.0.49/Makefile
---- nsapolicycoreutils/Makefile	2008-05-22 14:01:49.292734000 -0400
+--- nsapolicycoreutils/Makefile	2008-05-22 14:01:49.000000000 -0400
 +++ policycoreutils-2.0.49/Makefile	2008-05-16 11:27:02.000000000 -0400
 @@ -1,4 +1,4 @@
 -SUBDIRS = setfiles semanage load_policy newrole run_init secon audit2allow audit2why scripts sestatus semodule_package semodule semodule_link semodule_expand semodule_deps setsebool po
@@ -8,7 +8,7 @@
  INOTIFYH = $(shell ls /usr/include/sys/inotify.h 2>/dev/null)
  
 diff --exclude-from=exclude --exclude=sepolgen-1.0.11 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.c policycoreutils-2.0.49/restorecond/restorecond.c
---- nsapolicycoreutils/restorecond/restorecond.c	2008-05-22 14:01:42.385538000 -0400
+--- nsapolicycoreutils/restorecond/restorecond.c	2008-05-22 14:01:42.000000000 -0400
 +++ policycoreutils-2.0.49/restorecond/restorecond.c	2008-05-16 11:27:02.000000000 -0400
 @@ -210,9 +210,10 @@
  			}
@@ -37,7 +37,7 @@
  	free(scontext);
  	close(fd);
 diff --exclude-from=exclude --exclude=sepolgen-1.0.11 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.init policycoreutils-2.0.49/restorecond/restorecond.init
---- nsapolicycoreutils/restorecond/restorecond.init	2008-05-22 14:01:42.394526000 -0400
+--- nsapolicycoreutils/restorecond/restorecond.init	2008-05-22 14:01:42.000000000 -0400
 +++ policycoreutils-2.0.49/restorecond/restorecond.init	2008-05-16 11:27:02.000000000 -0400
 @@ -2,7 +2,7 @@
  #
@@ -49,8 +49,8 @@
  # listed in the /etc/selinux/restorecond.conf file, and restores the \
  # correct security context.
 diff --exclude-from=exclude --exclude=sepolgen-1.0.11 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/fixfiles policycoreutils-2.0.49/scripts/fixfiles
---- nsapolicycoreutils/scripts/fixfiles	2008-05-22 14:01:41.983778000 -0400
-+++ policycoreutils-2.0.49/scripts/fixfiles	2008-05-22 13:56:53.737824000 -0400
+--- nsapolicycoreutils/scripts/fixfiles	2008-05-22 14:01:41.000000000 -0400
++++ policycoreutils-2.0.49/scripts/fixfiles	2008-05-22 13:56:53.000000000 -0400
 @@ -138,6 +138,9 @@
  fi
  LogReadOnly
@@ -81,7 +81,7 @@
  
  if [ $# = 0 ]; then
 diff --exclude-from=exclude --exclude=sepolgen-1.0.11 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/fixfiles.8 policycoreutils-2.0.49/scripts/fixfiles.8
---- nsapolicycoreutils/scripts/fixfiles.8	2008-05-22 14:01:41.942823000 -0400
+--- nsapolicycoreutils/scripts/fixfiles.8	2008-05-22 14:01:41.000000000 -0400
 +++ policycoreutils-2.0.49/scripts/fixfiles.8	2008-05-16 11:27:02.000000000 -0400
 @@ -7,6 +7,8 @@
  
@@ -102,10 +102,249 @@
  
  .SH "OPTIONS"
  .TP 
+diff --exclude-from=exclude --exclude=sepolgen-1.0.11 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/semanage policycoreutils-2.0.49/semanage/semanage
+--- nsapolicycoreutils/semanage/semanage	2008-05-22 14:01:41.000000000 -0400
++++ policycoreutils-2.0.49/semanage/semanage	2008-06-12 14:34:26.499263000 -0400
+@@ -43,49 +43,52 @@
+ if __name__ == '__main__':
+ 
+ 	def usage(message = ""):
+-		print _('\
+-semanage {boolean|login|user|port|interface|fcontext|translation} -{l|D} [-n] \n\
+-semanage login -{a|d|m} [-sr] login_name\n\
+-semanage user -{a|d|m} [-LrRP] selinux_name\n\
+-semanage port -{a|d|m} [-tr] [ -p proto ] port | port_range\n\
+-semanage interface -{a|d|m} [-tr] interface_spec\n\
+-semanage fcontext -{a|d|m} [-frst] file_spec\n\
+-semanage translation -{a|d|m} [-T] level\n\n\
+-semanage boolean -{d|m} boolean\n\n\
+-\
+-Primary Options:\n\
+-\
+-	-a, --add        Add a OBJECT record NAME\n\
+-	-d, --delete     Delete a OBJECT record NAME\n\
+-	-m, --modify     Modify a OBJECT record NAME\n\
+-	-l, --list       List the OBJECTS\n\n\
+-	-C, --locallist  List OBJECTS local customizations\n\n\
+-	-D, --deleteall  Remove all OBJECTS local customizations\n\
+-\
+-	-h, --help       Display this message\n\
+-	-n, --noheading  Do not print heading when listing OBJECTS\n\
+-        -S, --store      Select and alternate SELinux store to manage\n\n\
+-Object-specific Options (see above):\n\
+-	-f, --ftype      File Type of OBJECT \n\
+-		"" (all files) \n\
+-		-- (regular file) \n\
+-		-d (directory) \n\
+-		-c (character device) \n\
+-		-b (block device) \n\
+-		-s (socket) \n\
+-		-l (symbolic link) \n\
+-		-p (named pipe) \n\n\
+-\
+-	-p, --proto      Port protocol (tcp or udp)\n\
+-	-P, --prefix     Prefix for home directory labeling\n\
+-	-L, --level      Default SELinux Level (MLS/MCS Systems only)\n\
+-	-R, --roles      SELinux Roles (ex: "sysadm_r staff_r")\n\
+-	-T, --trans      SELinux Level Translation (MLS/MCS Systems only)\n\n\
+-\
+-	-s, --seuser     SELinux User Name\n\
+-	-t, --type       SELinux Type for the object\n\
+-	-r, --range      MLS/MCS Security Range (MLS/MCS Systems only)\n\
+-')
++		print _("""
++semanage {boolean|login|user|port|interface|fcontext|translation} -{l|D} [-n] 
++semanage login -{a|d|m} [-sr] login_name
++semanage user -{a|d|m} [-LrRP] selinux_name
++semanage port -{a|d|m} [-tr] [ -p proto ] port | port_range
++semanage interface -{a|d|m} [-tr] interface_spec
++semanage fcontext -{a|d|m} [-frst] file_spec
++semanage translation -{a|d|m} [-T] level
++semanage boolean -{d|m} boolean
++semanage permissive -{d|a} type
++
++Primary Options:
++
++	-a, --add        Add a OBJECT record NAME
++	-d, --delete     Delete a OBJECT record NAME
++	-m, --modify     Modify a OBJECT record NAME
++	-l, --list       List the OBJECTS
++	-C, --locallist  List OBJECTS local customizations
++	-D, --deleteall  Remove all OBJECTS local customizations
++
++	-h, --help       Display this message
++	-n, --noheading  Do not print heading when listing OBJECTS
++        -S, --store      Select and alternate SELinux store to manage
++
++Object-specific Options (see above):
++
++	-f, --ftype      File Type of OBJECT 
++		"" (all files) 
++		-- (regular file) 
++		-d (directory) 
++		-c (character device) 
++		-b (block device) 
++		-s (socket) 
++		-l (symbolic link) 
++		-p (named pipe) 
++
++	-p, --proto      Port protocol (tcp or udp)
++	-P, --prefix     Prefix for home directory labeling
++	-L, --level      Default SELinux Level (MLS/MCS Systems only)
++	-R, --roles      SELinux Roles (ex: "sysadm_r staff_r")
++	-T, --trans      SELinux Level Translation (MLS/MCS Systems only)
++
++	-s, --seuser     SELinux User Name
++	-t, --type       SELinux Type for the object
++	-r, --range      MLS/MCS Security Range (MLS/MCS Systems only)
++""")
+ 		print message
+ 		sys.exit(1)
+ 		
+@@ -112,6 +115,8 @@
+ 		valid_option["translation"] += valid_everyone + [ '-T', '--trans' ] 
+ 		valid_option["boolean"] = []
+ 		valid_option["boolean"] += valid_everyone + [ '--on', "--off", "-1", "-0" ] 
++		valid_option["permissive"] = []
++		valid_option["permissive"] += [ '-a', '--add', '-d', '--delete', '-l', '--list', '-h', '--help', '-n', '--noheading', '-D', '--deleteall' ]
+ 		return valid_option
+ 
+ 	#
+@@ -266,6 +271,9 @@
+ 		if object == "translation":
+ 			OBJECT = seobject.setransRecords()
+ 		
++		if object == "permissive":
++			OBJECT = seobject.permissiveRecords(store)
++		
+ 		if list:
+ 			OBJECT.list(heading, locallist)
+ 			sys.exit(0);
+@@ -302,6 +310,9 @@
+ 
+ 			if object == "fcontext":
+ 				OBJECT.add(target, setype, ftype, serange, seuser)
++			if object == "permissive":
++				OBJECT.add(target)
++
+ 			sys.exit(0);
+ 			
+ 		if modify:
+diff --exclude-from=exclude --exclude=sepolgen-1.0.11 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/semanage.8 policycoreutils-2.0.49/semanage/semanage.8
+--- nsapolicycoreutils/semanage/semanage.8	2008-05-22 14:01:41.000000000 -0400
++++ policycoreutils-2.0.49/semanage/semanage.8	2008-06-11 16:18:48.000000000 -0400
+@@ -17,6 +17,8 @@
+ .br
+ .B semanage fcontext \-{a|d|m} [\-frst] file_spec
+ .br
++.B semanage permissive \-{a|d} type
++.br
+ .B semanage translation \-{a|d|m} [\-T] level
+ .P
+ 
+@@ -101,10 +103,11 @@
+ $ semanage fcontext -a -t httpd_sys_content_t "/web(/.*)?"
+ # Allow Apache to listen on port 81
+ $ semanage port -a -t http_port_t -p tcp 81
++# Change apache to a permissive domain
++$ semanage permissive -a http_t
+ .fi
+ 
+ .SH "AUTHOR"
+ This man page was written by Daniel Walsh <dwalsh at redhat.com> and
+ Russell Coker <rcoker at redhat.com>.
+ Examples by Thomas Bleher <ThomasBleher at gmx.de>.
+-
 diff --exclude-from=exclude --exclude=sepolgen-1.0.11 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/seobject.py policycoreutils-2.0.49/semanage/seobject.py
---- nsapolicycoreutils/semanage/seobject.py	2008-05-22 14:01:41.602159000 -0400
-+++ policycoreutils-2.0.49/semanage/seobject.py	2008-05-16 11:27:02.000000000 -0400
-@@ -464,7 +464,7 @@
+--- nsapolicycoreutils/semanage/seobject.py	2008-05-22 14:01:41.000000000 -0400
++++ policycoreutils-2.0.49/semanage/seobject.py	2008-06-12 14:34:36.038161000 -0400
+@@ -1,5 +1,5 @@
+ #! /usr/bin/python -E
+-# Copyright (C) 2005, 2006, 2007 Red Hat 
++# Copyright (C) 2005, 2006, 2007, 2008 Red Hat 
+ # see file 'COPYING' for use and warranty information
+ #
+ # semanage is a tool for managing SELinux configuration files
+@@ -24,7 +24,9 @@
+ import pwd, string, selinux, tempfile, os, re, sys
+ from semanage import *;
+ PROGNAME="policycoreutils"
++import sepolgen.module as module
+ 
++import commands
+ import gettext
+ gettext.bindtextdomain(PROGNAME, "/usr/share/locale")
+ gettext.textdomain(PROGNAME)
+@@ -246,7 +248,67 @@
+ 		os.close(fd)
+ 		os.rename(newfilename, self.filename)
+                 os.system("/sbin/service mcstrans reload > /dev/null")
+-                
++
++class permissiveRecords:
++	def __init__(self, store):
++               self.store = store
++
++	def get_all(self):
++               rc, out = commands.getstatusoutput("semodule -l | grep ^permissive");
++               l = []
++               for i in out.split():
++                      if i.startswith("permissive_"):
++                             l.append(i.split("permissive_")[1])
++               return l
++
++	def list(self,heading = 1, locallist = 0):
++		if heading:
++			print "\n%-25s\n" % (_("Permissive Types"))
++                for t in self.get_all():
++                       print t
++
++
++	def add(self, type):
++               name = "permissive_%s" % type
++               dirname = "/var/lib/selinux"
++               os.chdir(dirname)
++               filename = "%s.te" % name
++               modtxt = """
++module %s 1.0;
++
++require {
++          type %s;
++}
++
++permissive %s;
++""" % (name, type, type)
++               fd = open(filename,'w')
++               fd.write(modtxt)
++               fd.close()
++               mc = module.ModuleCompiler()
++               mc.create_module_package(filename, 1)
++               rc, out = commands.getstatusoutput("semodule -i permissive_%s.pp" % type);
++               for root, dirs, files in os.walk("top", topdown=False):
++                      for name in files:
++                             os.remove(os.path.join(root, name))
++                      for name in dirs:
++                             os.rmdir(os.path.join(root, name))
++
++               if rc != 0:
++                      raise ValueError(out)			
++
++
++	def delete(self, name):
++               rc, out = commands.getstatusoutput("semodule -r permissive_%s" % name );
++               if rc != 0:
++                      raise ValueError(out)			
++
++	def deleteall(self):
++               l = self.get_all()
++               if len(l) > 0:
++                      all = " permissive_".join(l)
++                      self.delete(all)
++
+ class semanageRecords:
+ 	def __init__(self, store):
+ 		self.sh = semanage_handle_create()
+@@ -464,7 +526,7 @@
  	def __init__(self, store = ""):
  		semanageRecords.__init__(self, store)
  

policycoreutils-sepolgen.patch:

Index: policycoreutils-sepolgen.patch
===================================================================
RCS file: /cvs/extras/rpms/policycoreutils/F-9/policycoreutils-sepolgen.patch,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- policycoreutils-sepolgen.patch	23 Jan 2008 22:18:29 -0000	1.10
+++ policycoreutils-sepolgen.patch	22 Jun 2008 13:34:48 -0000	1.11
@@ -1,6 +1,28 @@
-diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/refparser.py policycoreutils-2.0.35/sepolgen-1.0.11/src/sepolgen/refparser.py
+diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/audit.py policycoreutils-2.0.49/sepolgen-1.0.11/src/sepolgen/audit.py
+--- nsasepolgen/src/sepolgen/audit.py	2008-01-23 14:36:29.000000000 -0500
++++ policycoreutils-2.0.49/sepolgen-1.0.11/src/sepolgen/audit.py	2008-05-28 10:11:36.373597000 -0400
+@@ -241,14 +241,17 @@
+     def from_split_string(self, recs):
+         AuditMessage.from_split_string(self, recs)
+         dict={}
++        ctr = 0
+         for i in recs:
++            ctr = ctr + 1
+             t = i.split('=')
+             if len(t) < 2:
++                if t[0] == "context":
++                    self.type = refpolicy.SecurityContext(recs[ctr]).type
+                 continue
+             dict[t[0]]=t[1]
+         try:
+             self.role = refpolicy.SecurityContext(dict["scontext"]).role
+-            self.type = refpolicy.SecurityContext(dict["tcontext"]).type
+         except:
+             raise ValueError("Split string does not represent a valid compute sid message")
+     def output(self):
+diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/refparser.py policycoreutils-2.0.49/sepolgen-1.0.11/src/sepolgen/refparser.py
 --- nsasepolgen/src/sepolgen/refparser.py	2008-01-23 14:36:29.000000000 -0500
-+++ policycoreutils-2.0.35/sepolgen-1.0.11/src/sepolgen/refparser.py	2008-01-11 11:17:50.000000000 -0500
++++ policycoreutils-2.0.49/sepolgen-1.0.11/src/sepolgen/refparser.py	2008-05-16 11:27:03.000000000 -0400
 @@ -919,7 +919,7 @@
  def list_headers(root):
      modules = []


Index: policycoreutils.spec
===================================================================
RCS file: /cvs/extras/rpms/policycoreutils/F-9/policycoreutils.spec,v
retrieving revision 1.523
retrieving revision 1.524
diff -u -r1.523 -r1.524
--- policycoreutils.spec	22 May 2008 18:08:33 -0000	1.523
+++ policycoreutils.spec	22 Jun 2008 13:34:48 -0000	1.524
@@ -6,7 +6,7 @@
 Summary: SELinux policy core utilities
 Name:	 policycoreutils
 Version: 2.0.49
-Release: 3%{?dist}
+Release: 7%{?dist}
 License: GPLv2+
 Group:	 System Environment/Base
 Source:	 http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
@@ -63,6 +63,7 @@
 %install
 rm -rf %{buildroot}
 mkdir -p %{buildroot}/etc/rc.d/init.d
+mkdir -p %{buildroot}/var/lib/selinux
 mkdir -p %{buildroot}%{_bindir}
 mkdir -p %{buildroot}%{_sbindir}
 mkdir -p %{buildroot}/sbin
@@ -111,7 +112,7 @@
 Group: System Environment/Base
 Requires: policycoreutils = %{version}-%{release} 
 Requires: gnome-python2, pygtk2, pygtk2-libglade, gnome-python2-canvas 
-Requires: usermode, rhpl
+Requires: usermode 
 Requires: setools-console
 Requires: python >= 2.4
 BuildRequires: desktop-file-utils
@@ -172,6 +173,7 @@
 %dir %{_libdir}/python?.?/site-packages/sepolgen
 %{_libdir}/python?.?/site-packages/sepolgen/*
 %dir  /var/lib/sepolgen
+%dir  /var/lib/selinux
 /var/lib/sepolgen/perm_map
 
 %preun
@@ -183,7 +185,6 @@
 %post
 /sbin/chkconfig --add restorecond
 [ -f /usr/share/selinux/devel/include/build.conf ] && /usr/bin/sepolgen-ifgen  > /dev/null 
-/usr/bin/sepolgen-ifgen  > /dev/null
 exit 0
 
 %postun
@@ -192,6 +193,18 @@
 fi
 
 %changelog
+* Mon Jun 16 2008 Dan Walsh <dwalsh at redhat.com> 2.0.49-7
+- Fix sepolgen-ifgen processing
+
+* Thu Jun 12 2008 Dan Walsh <dwalsh at redhat.com> 2.0.49-6
+- Add deleteall to semanage permissive, cleanup error handling
+
+* Thu Jun 12 2008 Dan Walsh <dwalsh at redhat.com> 2.0.49-5
+- Complete removal of rhpl requirement
+
+* Wed Jun 11 2008 Dan Walsh <dwalsh at redhat.com> 2.0.49-4
+- Add semanage permissive *
+
 * Fri May 16 2008 Dan Walsh <dwalsh at redhat.com> 2.0.49-3
 - Fix fixfiles to cleanup /tmp and /var/tmp
 




More information about the fedora-extras-commits mailing list