[policycoreutils/f16] Update to latest sepolgen Allow ~ as a valid part of a filename in sepolgen

Daniel J Walsh dwalsh at fedoraproject.org
Wed Nov 16 16:40:35 UTC 2011


commit 2f61a7bd5528a4525d1fd25be3b919732d7021c4
Author: Dan Walsh <dwalsh at redhat.com>
Date:   Wed Nov 16 11:39:56 2011 -0500

    Update to latest sepolgen
    Allow ~ as a valid part of a filename in sepolgen

 policycoreutils-gui.patch      |  235 ++++++++++++++++++++--------------------
 policycoreutils-sepolgen.patch |  109 ++++++-------------
 policycoreutils.spec           |    8 +-
 sources                        |    2 +-
 4 files changed, 162 insertions(+), 192 deletions(-)
---
diff --git a/policycoreutils-gui.patch b/policycoreutils-gui.patch
index 31e935c..f956a2b 100644
--- a/policycoreutils-gui.patch
+++ b/policycoreutils-gui.patch
@@ -1,6 +1,6 @@
-diff -up policycoreutils-2.1.5/gui/booleansPage.py.gui policycoreutils-2.1.5/gui/booleansPage.py
---- policycoreutils-2.1.5/gui/booleansPage.py.gui	2011-09-07 16:58:08.229268533 -0400
-+++ policycoreutils-2.1.5/gui/booleansPage.py	2011-09-07 16:58:08.229268533 -0400
+diff -up policycoreutils-2.1.8/gui/booleansPage.py.gui policycoreutils-2.1.8/gui/booleansPage.py
+--- policycoreutils-2.1.8/gui/booleansPage.py.gui	2011-11-07 15:12:01.891834224 -0500
++++ policycoreutils-2.1.8/gui/booleansPage.py	2011-11-07 15:12:01.892834224 -0500
 @@ -0,0 +1,247 @@
 +#
 +# booleansPage.py - GUI for Booleans page in system-config-securitylevel
@@ -249,9 +249,9 @@ diff -up policycoreutils-2.1.5/gui/booleansPage.py.gui policycoreutils-2.1.5/gui
 +        self.load(self.filter)
 +        return True
 +        
-diff -up policycoreutils-2.1.5/gui/domainsPage.py.gui policycoreutils-2.1.5/gui/domainsPage.py
---- policycoreutils-2.1.5/gui/domainsPage.py.gui	2011-09-07 16:58:08.230268533 -0400
-+++ policycoreutils-2.1.5/gui/domainsPage.py	2011-09-07 16:58:08.230268533 -0400
+diff -up policycoreutils-2.1.8/gui/domainsPage.py.gui policycoreutils-2.1.8/gui/domainsPage.py
+--- policycoreutils-2.1.8/gui/domainsPage.py.gui	2011-11-07 15:12:01.892834224 -0500
++++ policycoreutils-2.1.8/gui/domainsPage.py	2011-11-07 15:12:01.892834224 -0500
 @@ -0,0 +1,154 @@
 +## domainsPage.py - show selinux domains
 +## Copyright (C) 2009 Red Hat, Inc.
@@ -407,9 +407,9 @@ diff -up policycoreutils-2.1.5/gui/domainsPage.py.gui policycoreutils-2.1.5/gui/
 +                
 +        except ValueError, e:
 +            self.error(e.args[0])
-diff -up policycoreutils-2.1.5/gui/fcontextPage.py.gui policycoreutils-2.1.5/gui/fcontextPage.py
---- policycoreutils-2.1.5/gui/fcontextPage.py.gui	2011-09-07 16:58:08.230268533 -0400
-+++ policycoreutils-2.1.5/gui/fcontextPage.py	2011-09-07 16:58:08.231268533 -0400
+diff -up policycoreutils-2.1.8/gui/fcontextPage.py.gui policycoreutils-2.1.8/gui/fcontextPage.py
+--- policycoreutils-2.1.8/gui/fcontextPage.py.gui	2011-11-07 15:12:01.893834225 -0500
++++ policycoreutils-2.1.8/gui/fcontextPage.py	2011-11-07 15:12:01.893834225 -0500
 @@ -0,0 +1,223 @@
 +## fcontextPage.py - show selinux mappings
 +## Copyright (C) 2006 Red Hat, Inc.
@@ -634,9 +634,9 @@ diff -up policycoreutils-2.1.5/gui/fcontextPage.py.gui policycoreutils-2.1.5/gui
 +        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 -up policycoreutils-2.1.5/gui/html_util.py.gui policycoreutils-2.1.5/gui/html_util.py
---- policycoreutils-2.1.5/gui/html_util.py.gui	2011-09-07 16:58:08.231268533 -0400
-+++ policycoreutils-2.1.5/gui/html_util.py	2011-09-07 16:58:08.231268533 -0400
+diff -up policycoreutils-2.1.8/gui/html_util.py.gui policycoreutils-2.1.8/gui/html_util.py
+--- policycoreutils-2.1.8/gui/html_util.py.gui	2011-11-07 15:12:01.894834226 -0500
++++ policycoreutils-2.1.8/gui/html_util.py	2011-11-07 15:12:01.894834226 -0500
 @@ -0,0 +1,164 @@
 +# Authors: John Dennis <jdennis at redhat.com>
 +#
@@ -802,9 +802,9 @@ diff -up policycoreutils-2.1.5/gui/html_util.py.gui policycoreutils-2.1.5/gui/ht
 +    doc += tail
 +    return doc
 +
-diff -up policycoreutils-2.1.5/gui/lockdown.glade.gui policycoreutils-2.1.5/gui/lockdown.glade
---- policycoreutils-2.1.5/gui/lockdown.glade.gui	2011-09-07 16:58:08.232268533 -0400
-+++ policycoreutils-2.1.5/gui/lockdown.glade	2011-09-07 16:58:08.232268533 -0400
+diff -up policycoreutils-2.1.8/gui/lockdown.glade.gui policycoreutils-2.1.8/gui/lockdown.glade
+--- policycoreutils-2.1.8/gui/lockdown.glade.gui	2011-11-07 15:12:01.895834226 -0500
++++ policycoreutils-2.1.8/gui/lockdown.glade	2011-11-07 15:12:01.895834226 -0500
 @@ -0,0 +1,771 @@
 +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
 +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
@@ -1577,9 +1577,9 @@ diff -up policycoreutils-2.1.5/gui/lockdown.glade.gui policycoreutils-2.1.5/gui/
 +</widget>
 +
 +</glade-interface>
-diff -up policycoreutils-2.1.5/gui/lockdown.gladep.gui policycoreutils-2.1.5/gui/lockdown.gladep
---- policycoreutils-2.1.5/gui/lockdown.gladep.gui	2011-09-07 16:58:08.233268533 -0400
-+++ policycoreutils-2.1.5/gui/lockdown.gladep	2011-09-07 16:58:08.233268533 -0400
+diff -up policycoreutils-2.1.8/gui/lockdown.gladep.gui policycoreutils-2.1.8/gui/lockdown.gladep
+--- policycoreutils-2.1.8/gui/lockdown.gladep.gui	2011-11-07 15:12:01.896834226 -0500
++++ policycoreutils-2.1.8/gui/lockdown.gladep	2011-11-07 15:12:01.896834226 -0500
 @@ -0,0 +1,7 @@
 +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
 +<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
@@ -1588,9 +1588,9 @@ diff -up policycoreutils-2.1.5/gui/lockdown.gladep.gui policycoreutils-2.1.5/gui
 +  <name></name>
 +  <program_name></program_name>
 +</glade-project>
-diff -up policycoreutils-2.1.5/gui/lockdown.py.gui policycoreutils-2.1.5/gui/lockdown.py
---- policycoreutils-2.1.5/gui/lockdown.py.gui	2011-09-07 16:58:08.234268533 -0400
-+++ policycoreutils-2.1.5/gui/lockdown.py	2011-09-08 09:42:14.245334273 -0400
+diff -up policycoreutils-2.1.8/gui/lockdown.py.gui policycoreutils-2.1.8/gui/lockdown.py
+--- policycoreutils-2.1.8/gui/lockdown.py.gui	2011-11-07 15:12:01.897834227 -0500
++++ policycoreutils-2.1.8/gui/lockdown.py	2011-11-07 15:12:01.897834227 -0500
 @@ -0,0 +1,375 @@
 +#!/usr/bin/python
 +#
@@ -1967,9 +1967,9 @@ diff -up policycoreutils-2.1.5/gui/lockdown.py.gui policycoreutils-2.1.5/gui/loc
 +
 +    app = booleanWindow()
 +    app.stand_alone()
-diff -up policycoreutils-2.1.5/gui/loginsPage.py.gui policycoreutils-2.1.5/gui/loginsPage.py
---- policycoreutils-2.1.5/gui/loginsPage.py.gui	2011-09-07 16:58:08.234268533 -0400
-+++ policycoreutils-2.1.5/gui/loginsPage.py	2011-09-07 16:58:08.234268533 -0400
+diff -up policycoreutils-2.1.8/gui/loginsPage.py.gui policycoreutils-2.1.8/gui/loginsPage.py
+--- policycoreutils-2.1.8/gui/loginsPage.py.gui	2011-11-07 15:12:01.898834228 -0500
++++ policycoreutils-2.1.8/gui/loginsPage.py	2011-11-07 15:12:01.898834228 -0500
 @@ -0,0 +1,185 @@
 +## loginsPage.py - show selinux mappings
 +## Copyright (C) 2006 Red Hat, Inc.
@@ -2156,9 +2156,9 @@ diff -up policycoreutils-2.1.5/gui/loginsPage.py.gui policycoreutils-2.1.5/gui/l
 +        self.store.set_value(iter, 1, seuser)
 +        self.store.set_value(iter, 2, seobject.translate(serange))
 +
-diff -up policycoreutils-2.1.5/gui/Makefile.gui policycoreutils-2.1.5/gui/Makefile
---- policycoreutils-2.1.5/gui/Makefile.gui	2011-09-07 16:58:08.235268532 -0400
-+++ policycoreutils-2.1.5/gui/Makefile	2011-09-08 09:43:07.615249107 -0400
+diff -up policycoreutils-2.1.8/gui/Makefile.gui policycoreutils-2.1.8/gui/Makefile
+--- policycoreutils-2.1.8/gui/Makefile.gui	2011-11-07 15:12:01.898834228 -0500
++++ policycoreutils-2.1.8/gui/Makefile	2011-11-07 15:12:01.898834228 -0500
 @@ -0,0 +1,40 @@
 +# Installation directories.
 +PREFIX ?= ${DESTDIR}/usr
@@ -2200,9 +2200,9 @@ diff -up policycoreutils-2.1.5/gui/Makefile.gui policycoreutils-2.1.5/gui/Makefi
 +indent:
 +
 +relabel:
-diff -up policycoreutils-2.1.5/gui/mappingsPage.py.gui policycoreutils-2.1.5/gui/mappingsPage.py
---- policycoreutils-2.1.5/gui/mappingsPage.py.gui	2011-09-07 16:58:08.235268532 -0400
-+++ policycoreutils-2.1.5/gui/mappingsPage.py	2011-09-07 16:58:08.236268531 -0400
+diff -up policycoreutils-2.1.8/gui/mappingsPage.py.gui policycoreutils-2.1.8/gui/mappingsPage.py
+--- policycoreutils-2.1.8/gui/mappingsPage.py.gui	2011-11-07 15:12:01.899834229 -0500
++++ policycoreutils-2.1.8/gui/mappingsPage.py	2011-11-07 15:12:01.899834229 -0500
 @@ -0,0 +1,56 @@
 +## mappingsPage.py - show selinux mappings
 +## Copyright (C) 2006 Red Hat, Inc.
@@ -2260,9 +2260,9 @@ diff -up policycoreutils-2.1.5/gui/mappingsPage.py.gui policycoreutils-2.1.5/gui
 +        for k in keys:
 +            print "%-25s %-25s %-25s" % (k, dict[k][0], translate(dict[k][1]))
 +
-diff -up policycoreutils-2.1.5/gui/modulesPage.py.gui policycoreutils-2.1.5/gui/modulesPage.py
---- policycoreutils-2.1.5/gui/modulesPage.py.gui	2011-09-07 16:58:08.236268531 -0400
-+++ policycoreutils-2.1.5/gui/modulesPage.py	2011-09-07 16:58:08.236268531 -0400
+diff -up policycoreutils-2.1.8/gui/modulesPage.py.gui policycoreutils-2.1.8/gui/modulesPage.py
+--- policycoreutils-2.1.8/gui/modulesPage.py.gui	2011-11-07 15:12:01.899834229 -0500
++++ policycoreutils-2.1.8/gui/modulesPage.py	2011-11-07 15:12:01.899834229 -0500
 @@ -0,0 +1,190 @@
 +## modulesPage.py - show selinux mappings
 +## Copyright (C) 2006-2009 Red Hat, Inc.
@@ -2454,9 +2454,9 @@ diff -up policycoreutils-2.1.5/gui/modulesPage.py.gui policycoreutils-2.1.5/gui/
 +                
 +        except ValueError, e:
 +            self.error(e.args[0])
-diff -up policycoreutils-2.1.5/gui/polgen.glade.gui policycoreutils-2.1.5/gui/polgen.glade
---- policycoreutils-2.1.5/gui/polgen.glade.gui	2011-09-07 16:58:08.239268531 -0400
-+++ policycoreutils-2.1.5/gui/polgen.glade	2011-09-07 16:58:08.240268531 -0400
+diff -up policycoreutils-2.1.8/gui/polgen.glade.gui policycoreutils-2.1.8/gui/polgen.glade
+--- policycoreutils-2.1.8/gui/polgen.glade.gui	2011-11-07 15:12:01.902834231 -0500
++++ policycoreutils-2.1.8/gui/polgen.glade	2011-11-07 15:12:01.903834231 -0500
 @@ -0,0 +1,3432 @@
 +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
 +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
@@ -5890,9 +5890,9 @@ diff -up policycoreutils-2.1.5/gui/polgen.glade.gui policycoreutils-2.1.5/gui/po
 +</widget>
 +
 +</glade-interface>
-diff -up policycoreutils-2.1.5/gui/polgen.gladep.gui policycoreutils-2.1.5/gui/polgen.gladep
---- policycoreutils-2.1.5/gui/polgen.gladep.gui	2011-09-07 16:58:08.241268531 -0400
-+++ policycoreutils-2.1.5/gui/polgen.gladep	2011-09-07 16:58:08.241268531 -0400
+diff -up policycoreutils-2.1.8/gui/polgen.gladep.gui policycoreutils-2.1.8/gui/polgen.gladep
+--- policycoreutils-2.1.8/gui/polgen.gladep.gui	2011-11-07 15:12:01.903834231 -0500
++++ policycoreutils-2.1.8/gui/polgen.gladep	2011-11-07 15:12:01.903834231 -0500
 @@ -0,0 +1,7 @@
 +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
 +<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
@@ -5901,9 +5901,9 @@ diff -up policycoreutils-2.1.5/gui/polgen.gladep.gui policycoreutils-2.1.5/gui/p
 +  <name></name>
 +  <program_name></program_name>
 +</glade-project>
-diff -up policycoreutils-2.1.5/gui/polgengui.py.gui policycoreutils-2.1.5/gui/polgengui.py
---- policycoreutils-2.1.5/gui/polgengui.py.gui	2011-09-07 16:58:08.242268530 -0400
-+++ policycoreutils-2.1.5/gui/polgengui.py	2011-09-07 16:58:08.242268530 -0400
+diff -up policycoreutils-2.1.8/gui/polgengui.py.gui policycoreutils-2.1.8/gui/polgengui.py
+--- policycoreutils-2.1.8/gui/polgengui.py.gui	2011-11-07 15:12:01.904834232 -0500
++++ policycoreutils-2.1.8/gui/polgengui.py	2011-11-07 15:12:01.904834232 -0500
 @@ -0,0 +1,750 @@
 +#!/usr/bin/python -Es
 +#
@@ -6655,10 +6655,10 @@ diff -up policycoreutils-2.1.5/gui/polgengui.py.gui policycoreutils-2.1.5/gui/po
 +
 +    app = childWindow()
 +    app.stand_alone()
-diff -up policycoreutils-2.1.5/gui/polgen.py.gui policycoreutils-2.1.5/gui/polgen.py
---- policycoreutils-2.1.5/gui/polgen.py.gui	2011-09-07 16:58:08.243268529 -0400
-+++ policycoreutils-2.1.5/gui/polgen.py	2011-09-07 16:58:08.244268529 -0400
-@@ -0,0 +1,1346 @@
+diff -up policycoreutils-2.1.8/gui/polgen.py.gui policycoreutils-2.1.8/gui/polgen.py
+--- policycoreutils-2.1.8/gui/polgen.py.gui	2011-11-07 15:12:01.905834233 -0500
++++ policycoreutils-2.1.8/gui/polgen.py	2011-11-07 15:12:39.045857808 -0500
+@@ -0,0 +1,1351 @@
 +#!/usr/bin/python -Es
 +#
 +# Copyright (C) 2007-2011 Red Hat 
@@ -6756,6 +6756,11 @@ diff -up policycoreutils-2.1.5/gui/polgen.py.gui policycoreutils-2.1.5/gui/polge
 +    roles.sort()
 +    return roles
 +
++def get_all_attributes():
++    attributes = map(lambda x: x['name'], setools.seinfo(setools.ATTRIBUTE))
++    attributes.sort()
++    return attributes
++
 +def get_all_domains():
 +    all_domains = []
 +    types=get_all_types()
@@ -8005,9 +8010,9 @@ diff -up policycoreutils-2.1.5/gui/polgen.py.gui policycoreutils-2.1.5/gui/polge
 +        sys.exit(0)
 +    except ValueError, e:
 +        usage(e)
-diff -up policycoreutils-2.1.5/gui/portsPage.py.gui policycoreutils-2.1.5/gui/portsPage.py
---- policycoreutils-2.1.5/gui/portsPage.py.gui	2011-09-07 16:58:08.244268529 -0400
-+++ policycoreutils-2.1.5/gui/portsPage.py	2011-09-07 16:58:08.244268529 -0400
+diff -up policycoreutils-2.1.8/gui/portsPage.py.gui policycoreutils-2.1.8/gui/portsPage.py
+--- policycoreutils-2.1.8/gui/portsPage.py.gui	2011-11-07 15:12:01.906834233 -0500
++++ policycoreutils-2.1.8/gui/portsPage.py	2011-11-07 15:12:01.906834233 -0500
 @@ -0,0 +1,259 @@
 +## portsPage.py - show selinux mappings
 +## Copyright (C) 2006 Red Hat, Inc.
@@ -8268,9 +8273,9 @@ diff -up policycoreutils-2.1.5/gui/portsPage.py.gui policycoreutils-2.1.5/gui/po
 +
 +        return True
 +        
-diff -up policycoreutils-2.1.5/gui/selinux.tbl.gui policycoreutils-2.1.5/gui/selinux.tbl
---- policycoreutils-2.1.5/gui/selinux.tbl.gui	2011-09-07 16:58:08.245268529 -0400
-+++ policycoreutils-2.1.5/gui/selinux.tbl	2011-09-07 16:58:08.246268529 -0400
+diff -up policycoreutils-2.1.8/gui/selinux.tbl.gui policycoreutils-2.1.8/gui/selinux.tbl
+--- policycoreutils-2.1.8/gui/selinux.tbl.gui	2011-11-07 15:12:01.907834233 -0500
++++ policycoreutils-2.1.8/gui/selinux.tbl	2011-11-07 15:12:01.907834233 -0500
 @@ -0,0 +1,234 @@
 +acct_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for acct daemon")
 +allow_daemons_dump_core _("Admin") _("Allow all daemons to write corefiles to /")
@@ -8506,9 +8511,9 @@ diff -up policycoreutils-2.1.5/gui/selinux.tbl.gui policycoreutils-2.1.5/gui/sel
 +webadm_manage_user_files _("HTTPD Service") _("Allow SELinux webadm user to manage unprivileged users home directories")
 +webadm_read_user_files _("HTTPD Service") _("Allow SELinux webadm user to read unprivileged users home directories")
 +
-diff -up policycoreutils-2.1.5/gui/semanagePage.py.gui policycoreutils-2.1.5/gui/semanagePage.py
---- policycoreutils-2.1.5/gui/semanagePage.py.gui	2011-09-07 16:58:08.246268529 -0400
-+++ policycoreutils-2.1.5/gui/semanagePage.py	2011-09-07 16:58:08.246268529 -0400
+diff -up policycoreutils-2.1.8/gui/semanagePage.py.gui policycoreutils-2.1.8/gui/semanagePage.py
+--- policycoreutils-2.1.8/gui/semanagePage.py.gui	2011-11-07 15:12:01.908834234 -0500
++++ policycoreutils-2.1.8/gui/semanagePage.py	2011-11-07 15:12:01.908834234 -0500
 @@ -0,0 +1,168 @@
 +## semanagePage.py - show selinux mappings
 +## Copyright (C) 2006 Red Hat, Inc.
@@ -8678,9 +8683,9 @@ diff -up policycoreutils-2.1.5/gui/semanagePage.py.gui policycoreutils-2.1.5/gui
 +        self.load(self.filter)
 +        return True
 +        
-diff -up policycoreutils-2.1.5/gui/statusPage.py.gui policycoreutils-2.1.5/gui/statusPage.py
---- policycoreutils-2.1.5/gui/statusPage.py.gui	2011-09-07 16:58:08.247268528 -0400
-+++ policycoreutils-2.1.5/gui/statusPage.py	2011-09-07 16:58:08.247268528 -0400
+diff -up policycoreutils-2.1.8/gui/statusPage.py.gui policycoreutils-2.1.8/gui/statusPage.py
+--- policycoreutils-2.1.8/gui/statusPage.py.gui	2011-11-07 15:12:01.909834235 -0500
++++ policycoreutils-2.1.8/gui/statusPage.py	2011-11-07 15:12:01.909834235 -0500
 @@ -0,0 +1,190 @@
 +# statusPage.py - show selinux status
 +## Copyright (C) 2006-2009 Red Hat, Inc.
@@ -8872,9 +8877,9 @@ diff -up policycoreutils-2.1.5/gui/statusPage.py.gui policycoreutils-2.1.5/gui/s
 +        return self.types[self.selinuxTypeOptionMenu.get_active()]
 +
 +
-diff -up policycoreutils-2.1.5/gui/system-config-selinux.glade.gui policycoreutils-2.1.5/gui/system-config-selinux.glade
---- policycoreutils-2.1.5/gui/system-config-selinux.glade.gui	2011-09-07 16:58:08.249268527 -0400
-+++ policycoreutils-2.1.5/gui/system-config-selinux.glade	2011-09-08 09:44:04.498161457 -0400
+diff -up policycoreutils-2.1.8/gui/system-config-selinux.glade.gui policycoreutils-2.1.8/gui/system-config-selinux.glade
+--- policycoreutils-2.1.8/gui/system-config-selinux.glade.gui	2011-11-07 15:12:01.913834238 -0500
++++ policycoreutils-2.1.8/gui/system-config-selinux.glade	2011-11-07 15:12:01.913834238 -0500
 @@ -0,0 +1,3024 @@
 +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
 +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
@@ -11900,9 +11905,9 @@ diff -up policycoreutils-2.1.5/gui/system-config-selinux.glade.gui policycoreuti
 +</widget>
 +
 +</glade-interface>
-diff -up policycoreutils-2.1.5/gui/system-config-selinux.gladep.gui policycoreutils-2.1.5/gui/system-config-selinux.gladep
---- policycoreutils-2.1.5/gui/system-config-selinux.gladep.gui	2011-09-07 16:58:08.250268527 -0400
-+++ policycoreutils-2.1.5/gui/system-config-selinux.gladep	2011-09-07 16:58:08.250268527 -0400
+diff -up policycoreutils-2.1.8/gui/system-config-selinux.gladep.gui policycoreutils-2.1.8/gui/system-config-selinux.gladep
+--- policycoreutils-2.1.8/gui/system-config-selinux.gladep.gui	2011-11-07 15:12:01.914834238 -0500
++++ policycoreutils-2.1.8/gui/system-config-selinux.gladep	2011-11-07 15:12:01.914834238 -0500
 @@ -0,0 +1,7 @@
 +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
 +<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
@@ -11911,9 +11916,9 @@ diff -up policycoreutils-2.1.5/gui/system-config-selinux.gladep.gui policycoreut
 +  <name></name>
 +  <program_name></program_name>
 +</glade-project>
-diff -up policycoreutils-2.1.5/gui/system-config-selinux.py.gui policycoreutils-2.1.5/gui/system-config-selinux.py
---- policycoreutils-2.1.5/gui/system-config-selinux.py.gui	2011-09-07 16:58:08.251268527 -0400
-+++ policycoreutils-2.1.5/gui/system-config-selinux.py	2011-09-07 16:58:08.251268527 -0400
+diff -up policycoreutils-2.1.8/gui/system-config-selinux.py.gui policycoreutils-2.1.8/gui/system-config-selinux.py
+--- policycoreutils-2.1.8/gui/system-config-selinux.py.gui	2011-11-07 15:12:01.914834238 -0500
++++ policycoreutils-2.1.8/gui/system-config-selinux.py	2011-11-07 15:12:01.915834239 -0500
 @@ -0,0 +1,187 @@
 +#!/usr/bin/python -Es
 +#
@@ -12102,9 +12107,9 @@ diff -up policycoreutils-2.1.5/gui/system-config-selinux.py.gui policycoreutils-
 +
 +    app = childWindow()
 +    app.stand_alone()
-diff -up policycoreutils-2.1.5/gui/templates/boolean.py.gui policycoreutils-2.1.5/gui/templates/boolean.py
---- policycoreutils-2.1.5/gui/templates/boolean.py.gui	2011-09-07 16:58:08.252268527 -0400
-+++ policycoreutils-2.1.5/gui/templates/boolean.py	2011-09-07 16:58:08.252268527 -0400
+diff -up policycoreutils-2.1.8/gui/templates/boolean.py.gui policycoreutils-2.1.8/gui/templates/boolean.py
+--- policycoreutils-2.1.8/gui/templates/boolean.py.gui	2011-11-07 15:12:01.915834239 -0500
++++ policycoreutils-2.1.8/gui/templates/boolean.py	2011-11-07 15:12:01.916834240 -0500
 @@ -0,0 +1,40 @@
 +# Copyright (C) 2007-2011 Red Hat
 +# see file 'COPYING' for use and warranty information
@@ -12146,9 +12151,9 @@ diff -up policycoreutils-2.1.5/gui/templates/boolean.py.gui policycoreutils-2.1.
 +')
 +"""
 +
-diff -up policycoreutils-2.1.5/gui/templates/etc_rw.py.gui policycoreutils-2.1.5/gui/templates/etc_rw.py
---- policycoreutils-2.1.5/gui/templates/etc_rw.py.gui	2011-09-07 16:58:08.252268527 -0400
-+++ policycoreutils-2.1.5/gui/templates/etc_rw.py	2011-09-07 16:58:08.252268527 -0400
+diff -up policycoreutils-2.1.8/gui/templates/etc_rw.py.gui policycoreutils-2.1.8/gui/templates/etc_rw.py
+--- policycoreutils-2.1.8/gui/templates/etc_rw.py.gui	2011-11-07 15:12:01.916834240 -0500
++++ policycoreutils-2.1.8/gui/templates/etc_rw.py	2011-11-07 15:12:01.916834240 -0500
 @@ -0,0 +1,112 @@
 +# Copyright (C) 2007-2011 Red Hat
 +# see file 'COPYING' for use and warranty information
@@ -12262,9 +12267,9 @@ diff -up policycoreutils-2.1.5/gui/templates/etc_rw.py.gui policycoreutils-2.1.5
 +fc_dir="""\
 +FILENAME(/.*)?		gen_context(system_u:object_r:TEMPLATETYPE_etc_rw_t,s0)
 +"""
-diff -up policycoreutils-2.1.5/gui/templates/executable.py.gui policycoreutils-2.1.5/gui/templates/executable.py
---- policycoreutils-2.1.5/gui/templates/executable.py.gui	2011-09-07 16:58:08.253268527 -0400
-+++ policycoreutils-2.1.5/gui/templates/executable.py	2011-09-07 16:58:08.253268527 -0400
+diff -up policycoreutils-2.1.8/gui/templates/executable.py.gui policycoreutils-2.1.8/gui/templates/executable.py
+--- policycoreutils-2.1.8/gui/templates/executable.py.gui	2011-11-07 15:12:01.916834240 -0500
++++ policycoreutils-2.1.8/gui/templates/executable.py	2011-11-07 15:12:01.917834240 -0500
 @@ -0,0 +1,451 @@
 +# Copyright (C) 2007-2011 Red Hat
 +# see file 'COPYING' for use and warranty information
@@ -12717,9 +12722,9 @@ diff -up policycoreutils-2.1.5/gui/templates/executable.py.gui policycoreutils-2
 +
 +EXECUTABLE	--	gen_context(system_u:object_r:TEMPLATETYPE_initrc_exec_t,s0)
 +"""
-diff -up policycoreutils-2.1.5/gui/templates/__init__.py.gui policycoreutils-2.1.5/gui/templates/__init__.py
---- policycoreutils-2.1.5/gui/templates/__init__.py.gui	2011-09-07 16:58:08.254268527 -0400
-+++ policycoreutils-2.1.5/gui/templates/__init__.py	2011-09-07 16:58:08.254268527 -0400
+diff -up policycoreutils-2.1.8/gui/templates/__init__.py.gui policycoreutils-2.1.8/gui/templates/__init__.py
+--- policycoreutils-2.1.8/gui/templates/__init__.py.gui	2011-11-07 15:12:01.917834240 -0500
++++ policycoreutils-2.1.8/gui/templates/__init__.py	2011-11-07 15:12:01.917834240 -0500
 @@ -0,0 +1,18 @@
 +#
 +# Copyright (C) 2007-2011 Red Hat
@@ -12739,9 +12744,9 @@ diff -up policycoreutils-2.1.5/gui/templates/__init__.py.gui policycoreutils-2.1
 +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 +#
 +
-diff -up policycoreutils-2.1.5/gui/templates/network.py.gui policycoreutils-2.1.5/gui/templates/network.py
---- policycoreutils-2.1.5/gui/templates/network.py.gui	2011-09-07 16:58:08.254268527 -0400
-+++ policycoreutils-2.1.5/gui/templates/network.py	2011-09-07 16:58:08.255268527 -0400
+diff -up policycoreutils-2.1.8/gui/templates/network.py.gui policycoreutils-2.1.8/gui/templates/network.py
+--- policycoreutils-2.1.8/gui/templates/network.py.gui	2011-11-07 15:12:01.917834240 -0500
++++ policycoreutils-2.1.8/gui/templates/network.py	2011-11-07 15:12:01.918834240 -0500
 @@ -0,0 +1,102 @@
 +# Copyright (C) 2007-2011 Red Hat
 +# see file 'COPYING' for use and warranty information
@@ -12845,9 +12850,9 @@ diff -up policycoreutils-2.1.5/gui/templates/network.py.gui policycoreutils-2.1.
 +corenet_udp_bind_all_unreserved_ports(TEMPLATETYPE_t)
 +"""
 +
-diff -up policycoreutils-2.1.5/gui/templates/rw.py.gui policycoreutils-2.1.5/gui/templates/rw.py
---- policycoreutils-2.1.5/gui/templates/rw.py.gui	2011-09-07 16:58:08.255268527 -0400
-+++ policycoreutils-2.1.5/gui/templates/rw.py	2011-09-07 16:58:08.255268527 -0400
+diff -up policycoreutils-2.1.8/gui/templates/rw.py.gui policycoreutils-2.1.8/gui/templates/rw.py
+--- policycoreutils-2.1.8/gui/templates/rw.py.gui	2011-11-07 15:12:01.918834240 -0500
++++ policycoreutils-2.1.8/gui/templates/rw.py	2011-11-07 15:12:01.918834240 -0500
 @@ -0,0 +1,129 @@
 +# Copyright (C) 2007-2011 Red Hat
 +# see file 'COPYING' for use and warranty information
@@ -12978,9 +12983,9 @@ diff -up policycoreutils-2.1.5/gui/templates/rw.py.gui policycoreutils-2.1.5/gui
 +fc_dir="""
 +FILENAME(/.*)?		gen_context(system_u:object_r:TEMPLATETYPE_rw_t,s0)
 +"""
-diff -up policycoreutils-2.1.5/gui/templates/script.py.gui policycoreutils-2.1.5/gui/templates/script.py
---- policycoreutils-2.1.5/gui/templates/script.py.gui	2011-09-07 16:58:08.256268527 -0400
-+++ policycoreutils-2.1.5/gui/templates/script.py	2011-09-07 16:58:08.256268527 -0400
+diff -up policycoreutils-2.1.8/gui/templates/script.py.gui policycoreutils-2.1.8/gui/templates/script.py
+--- policycoreutils-2.1.8/gui/templates/script.py.gui	2011-11-07 15:12:01.918834240 -0500
++++ policycoreutils-2.1.8/gui/templates/script.py	2011-11-07 15:12:01.919834241 -0500
 @@ -0,0 +1,126 @@
 +# Copyright (C) 2007-2011 Red Hat
 +# see file 'COPYING' for use and warranty information
@@ -13108,9 +13113,9 @@ diff -up policycoreutils-2.1.5/gui/templates/script.py.gui policycoreutils-2.1.5
 +_EOF
 +fi
 +"""
-diff -up policycoreutils-2.1.5/gui/templates/semodule.py.gui policycoreutils-2.1.5/gui/templates/semodule.py
---- policycoreutils-2.1.5/gui/templates/semodule.py.gui	2011-09-07 16:58:08.256268527 -0400
-+++ policycoreutils-2.1.5/gui/templates/semodule.py	2011-09-07 16:58:08.256268527 -0400
+diff -up policycoreutils-2.1.8/gui/templates/semodule.py.gui policycoreutils-2.1.8/gui/templates/semodule.py
+--- policycoreutils-2.1.8/gui/templates/semodule.py.gui	2011-11-07 15:12:01.919834241 -0500
++++ policycoreutils-2.1.8/gui/templates/semodule.py	2011-11-07 15:12:01.919834241 -0500
 @@ -0,0 +1,41 @@
 +# Copyright (C) 2007-2011 Red Hat
 +# see file 'COPYING' for use and warranty information
@@ -13153,9 +13158,9 @@ diff -up policycoreutils-2.1.5/gui/templates/semodule.py.gui policycoreutils-2.1
 +semanage ports -a -t TEMPLATETYPE_port_t -p udp PORTNUM
 +"""
 +
-diff -up policycoreutils-2.1.5/gui/templates/tmp.py.gui policycoreutils-2.1.5/gui/templates/tmp.py
---- policycoreutils-2.1.5/gui/templates/tmp.py.gui	2011-09-07 16:58:08.257268526 -0400
-+++ policycoreutils-2.1.5/gui/templates/tmp.py	2011-09-07 16:58:08.257268526 -0400
+diff -up policycoreutils-2.1.8/gui/templates/tmp.py.gui policycoreutils-2.1.8/gui/templates/tmp.py
+--- policycoreutils-2.1.8/gui/templates/tmp.py.gui	2011-11-07 15:12:01.919834241 -0500
++++ policycoreutils-2.1.8/gui/templates/tmp.py	2011-11-07 15:12:01.920834242 -0500
 @@ -0,0 +1,102 @@
 +# Copyright (C) 2007-2011 Red Hat
 +# see file 'COPYING' for use and warranty information
@@ -13259,9 +13264,9 @@ diff -up policycoreutils-2.1.5/gui/templates/tmp.py.gui policycoreutils-2.1.5/gu
 +	files_search_tmp($1)
 +	admin_pattern($1, TEMPLATETYPE_tmp_t)
 +"""
-diff -up policycoreutils-2.1.5/gui/templates/user.py.gui policycoreutils-2.1.5/gui/templates/user.py
---- policycoreutils-2.1.5/gui/templates/user.py.gui	2011-09-07 16:58:08.257268526 -0400
-+++ policycoreutils-2.1.5/gui/templates/user.py	2011-09-07 16:58:08.257268526 -0400
+diff -up policycoreutils-2.1.8/gui/templates/user.py.gui policycoreutils-2.1.8/gui/templates/user.py
+--- policycoreutils-2.1.8/gui/templates/user.py.gui	2011-11-07 15:12:01.920834242 -0500
++++ policycoreutils-2.1.8/gui/templates/user.py	2011-11-07 15:12:01.920834242 -0500
 @@ -0,0 +1,204 @@
 +# Copyright (C) 2007-2011 Red Hat
 +# see file 'COPYING' for use and warranty information
@@ -13467,9 +13472,9 @@ diff -up policycoreutils-2.1.5/gui/templates/user.py.gui policycoreutils-2.1.5/g
 +te_newrole_rules="""
 +seutil_run_newrole(TEMPLATETYPE_t, TEMPLATETYPE_r)
 +"""
-diff -up policycoreutils-2.1.5/gui/templates/var_cache.py.gui policycoreutils-2.1.5/gui/templates/var_cache.py
---- policycoreutils-2.1.5/gui/templates/var_cache.py.gui	2011-09-07 16:58:08.258268525 -0400
-+++ policycoreutils-2.1.5/gui/templates/var_cache.py	2011-09-07 16:58:08.258268525 -0400
+diff -up policycoreutils-2.1.8/gui/templates/var_cache.py.gui policycoreutils-2.1.8/gui/templates/var_cache.py
+--- policycoreutils-2.1.8/gui/templates/var_cache.py.gui	2011-11-07 15:12:01.920834242 -0500
++++ policycoreutils-2.1.8/gui/templates/var_cache.py	2011-11-07 15:12:01.921834243 -0500
 @@ -0,0 +1,132 @@
 +# Copyright (C) 2007-2011 Red Hat
 +# see file 'COPYING' for use and warranty information
@@ -13603,9 +13608,9 @@ diff -up policycoreutils-2.1.5/gui/templates/var_cache.py.gui policycoreutils-2.
 +fc_dir="""\
 +FILENAME(/.*)?		gen_context(system_u:object_r:TEMPLATETYPE_cache_t,s0)
 +"""
-diff -up policycoreutils-2.1.5/gui/templates/var_lib.py.gui policycoreutils-2.1.5/gui/templates/var_lib.py
---- policycoreutils-2.1.5/gui/templates/var_lib.py.gui	2011-09-07 16:58:08.258268525 -0400
-+++ policycoreutils-2.1.5/gui/templates/var_lib.py	2011-09-07 16:58:08.259268525 -0400
+diff -up policycoreutils-2.1.8/gui/templates/var_lib.py.gui policycoreutils-2.1.8/gui/templates/var_lib.py
+--- policycoreutils-2.1.8/gui/templates/var_lib.py.gui	2011-11-07 15:12:01.921834243 -0500
++++ policycoreutils-2.1.8/gui/templates/var_lib.py	2011-11-07 15:12:01.921834243 -0500
 @@ -0,0 +1,160 @@
 +# Copyright (C) 2007-2011 Red Hat
 +# see file 'COPYING' for use and warranty information
@@ -13767,9 +13772,9 @@ diff -up policycoreutils-2.1.5/gui/templates/var_lib.py.gui policycoreutils-2.1.
 +fc_dir="""\
 +FILENAME(/.*)?		gen_context(system_u:object_r:TEMPLATETYPE_var_lib_t,s0)
 +"""
-diff -up policycoreutils-2.1.5/gui/templates/var_log.py.gui policycoreutils-2.1.5/gui/templates/var_log.py
---- policycoreutils-2.1.5/gui/templates/var_log.py.gui	2011-09-07 16:58:08.259268525 -0400
-+++ policycoreutils-2.1.5/gui/templates/var_log.py	2011-09-07 16:58:08.259268525 -0400
+diff -up policycoreutils-2.1.8/gui/templates/var_log.py.gui policycoreutils-2.1.8/gui/templates/var_log.py
+--- policycoreutils-2.1.8/gui/templates/var_log.py.gui	2011-11-07 15:12:01.921834243 -0500
++++ policycoreutils-2.1.8/gui/templates/var_log.py	2011-11-07 15:12:01.922834244 -0500
 @@ -0,0 +1,114 @@
 +# Copyright (C) 2007-2011 Red Hat
 +# see file 'COPYING' for use and warranty information
@@ -13885,9 +13890,9 @@ diff -up policycoreutils-2.1.5/gui/templates/var_log.py.gui policycoreutils-2.1.
 +fc_dir="""\
 +FILENAME(/.*)?		gen_context(system_u:object_r:TEMPLATETYPE_log_t,s0)
 +"""
-diff -up policycoreutils-2.1.5/gui/templates/var_run.py.gui policycoreutils-2.1.5/gui/templates/var_run.py
---- policycoreutils-2.1.5/gui/templates/var_run.py.gui	2011-09-07 16:58:08.260268525 -0400
-+++ policycoreutils-2.1.5/gui/templates/var_run.py	2011-09-07 16:58:08.260268525 -0400
+diff -up policycoreutils-2.1.8/gui/templates/var_run.py.gui policycoreutils-2.1.8/gui/templates/var_run.py
+--- policycoreutils-2.1.8/gui/templates/var_run.py.gui	2011-11-07 15:12:01.922834244 -0500
++++ policycoreutils-2.1.8/gui/templates/var_run.py	2011-11-07 15:12:01.922834244 -0500
 @@ -0,0 +1,101 @@
 +# Copyright (C) 2007-2011 Red Hat
 +# see file 'COPYING' for use and warranty information
@@ -13990,9 +13995,9 @@ diff -up policycoreutils-2.1.5/gui/templates/var_run.py.gui policycoreutils-2.1.
 +fc_dir="""\
 +FILENAME(/.*)?		gen_context(system_u:object_r:TEMPLATETYPE_var_run_t,s0)
 +"""
-diff -up policycoreutils-2.1.5/gui/templates/var_spool.py.gui policycoreutils-2.1.5/gui/templates/var_spool.py
---- policycoreutils-2.1.5/gui/templates/var_spool.py.gui	2011-09-07 16:58:08.261268525 -0400
-+++ policycoreutils-2.1.5/gui/templates/var_spool.py	2011-09-07 16:58:08.261268525 -0400
+diff -up policycoreutils-2.1.8/gui/templates/var_spool.py.gui policycoreutils-2.1.8/gui/templates/var_spool.py
+--- policycoreutils-2.1.8/gui/templates/var_spool.py.gui	2011-11-07 15:12:01.922834244 -0500
++++ policycoreutils-2.1.8/gui/templates/var_spool.py	2011-11-07 15:12:01.923834245 -0500
 @@ -0,0 +1,131 @@
 +# Copyright (C) 2007-2011 Red Hat
 +# see file 'COPYING' for use and warranty information
@@ -14125,9 +14130,9 @@ diff -up policycoreutils-2.1.5/gui/templates/var_spool.py.gui policycoreutils-2.
 +fc_dir="""\
 +FILENAME(/.*)?		gen_context(system_u:object_r:TEMPLATETYPE_spool_t,s0)
 +"""
-diff -up policycoreutils-2.1.5/gui/usersPage.py.gui policycoreutils-2.1.5/gui/usersPage.py
---- policycoreutils-2.1.5/gui/usersPage.py.gui	2011-09-07 16:58:08.261268525 -0400
-+++ policycoreutils-2.1.5/gui/usersPage.py	2011-09-07 16:58:08.261268525 -0400
+diff -up policycoreutils-2.1.8/gui/usersPage.py.gui policycoreutils-2.1.8/gui/usersPage.py
+--- policycoreutils-2.1.8/gui/usersPage.py.gui	2011-11-07 15:12:01.923834245 -0500
++++ policycoreutils-2.1.8/gui/usersPage.py	2011-11-07 15:12:01.923834245 -0500
 @@ -0,0 +1,150 @@
 +## usersPage.py - show selinux mappings
 +## Copyright (C) 2006,2007,2008 Red Hat, Inc.
diff --git a/policycoreutils-sepolgen.patch b/policycoreutils-sepolgen.patch
index f4087ea..0482ee2 100644
--- a/policycoreutils-sepolgen.patch
+++ b/policycoreutils-sepolgen.patch
@@ -1,26 +1,8 @@
 diff --git a/sepolgen/src/sepolgen/audit.py b/sepolgen/src/sepolgen/audit.py
-index 24e308e..1b0a8e5 100644
+index 898fbc3..9fdfafa 100644
 --- a/sepolgen/src/sepolgen/audit.py
 +++ b/sepolgen/src/sepolgen/audit.py
-@@ -68,6 +68,17 @@ def get_dmesg_msgs():
-                               stdout=subprocess.PIPE).communicate()[0]
-     return output
- 
-+def get_log_msgs():
-+    """Obtain all of the avc and policy load messages from /var/log/messages.
-+
-+    Returns:
-+       string contain all of the audit messages returned by /var/log/messages.
-+    """
-+    import subprocess
-+    output = subprocess.Popen(["/bin/grep", "avc",  "/var/log/messages"],
-+                              stdout=subprocess.PIPE).communicate()[0]
-+    return output
-+
- # Classes representing audit messages
- 
- class AuditMessage:
-@@ -127,6 +138,9 @@ class PathMessage(AuditMessage):
+@@ -127,6 +127,9 @@ class PathMessage(AuditMessage):
              if fields[0] == "path":
                  self.path = fields[1][1:-1]
                  return
@@ -30,11 +12,8 @@ index 24e308e..1b0a8e5 100644
  
  class AVCMessage(AuditMessage):
      """AVC message representing an access denial or granted message.
-@@ -165,8 +179,11 @@ class AVCMessage(AuditMessage):
-         self.comm = ""
-         self.exe = ""
-         self.path = ""
-+        self.name = ""
+@@ -168,6 +171,8 @@ class AVCMessage(AuditMessage):
+         self.name = ""
          self.accesses = []
          self.denial = True
 +        self.type = audit2why.TERULE
@@ -42,12 +21,7 @@ index 24e308e..1b0a8e5 100644
  
      def __parse_access(self, recs, start):
          # This is kind of sucky - the access that is in a space separated
-@@ -223,10 +240,36 @@ class AVCMessage(AuditMessage):
-                 self.comm = fields[1][1:-1]
-             elif fields[0] == "exe":
-                 self.exe = fields[1][1:-1]
-+            elif fields[0] == "name":
-+                self.name = fields[1][1:-1]
+@@ -229,7 +234,31 @@ class AVCMessage(AuditMessage):
  
          if not found_src or not found_tgt or not found_class or not found_access:
              raise ValueError("AVC message in invalid format [%s]\n" % self.message)
@@ -74,13 +48,13 @@ index 24e308e..1b0a8e5 100644
 +                raise ValueError("Invalid permission %s\n" % " ".join(self.accesses))
 +            if self.type == audit2why.BADCOMPUTE:
 +                raise ValueError("Error during access vector computation")
-+            
++
 +            avcdict[(scontext, tcontext, self.tclass, access_tuple)] = (self.type, self.bools)
 +
  class PolicyLoadMessage(AuditMessage):
      """Audit message indicating that the policy was reloaded."""
      def __init__(self, message):
-@@ -469,10 +512,10 @@ class AuditParser:
+@@ -472,10 +501,10 @@ class AuditParser:
              if avc_filter:
                  if avc_filter.filter(avc):
                      av_set.add(avc.scontext.type, avc.tcontext.type, avc.tclass,
@@ -126,7 +100,7 @@ index 1a9a3e5..d56dd92 100644
      def __iter__(self):
          return iter(self.children)
 diff --git a/sepolgen/src/sepolgen/policygen.py b/sepolgen/src/sepolgen/policygen.py
-index 0e6b502..6ce892c 100644
+index 0e6b502..4882999 100644
 --- a/sepolgen/src/sepolgen/policygen.py
 +++ b/sepolgen/src/sepolgen/policygen.py
 @@ -29,6 +29,8 @@ import objectmodel
@@ -155,9 +129,9 @@ index 0e6b502..6ce892c 100644
 -                rule.comment = refpolicy.Comment(explain_access(av, verbosity=self.explain))
 +                rule.comment = str(refpolicy.Comment(explain_access(av, verbosity=self.explain)))
 +            if av.type == audit2why.ALLOW:
-+                rule.comment += "#!!!! This avc is allowed in the current policy\n" 
++                rule.comment += "#!!!! This avc is allowed in the current policy\n"
 +            if av.type == audit2why.DONTAUDIT:
-+                rule.comment += "#!!!! This avc has a dontaudit rule in the current policy\n" 
++                rule.comment += "#!!!! This avc has a dontaudit rule in the current policy\n"
 +
 +            if av.type == audit2why.BOOLEAN:
 +                if len(av.bools) > 1:
@@ -166,7 +140,7 @@ index 0e6b502..6ce892c 100644
 +                    rule.comment += "#!!!! This avc can be allowed using the boolean '%s'\n" % av.bools[0][0]
 +
 +            if av.type == audit2why.CONSTRAINT:
-+                rule.comment += "#!!!! This avc is a constraint violation.  You will need to add an attribute to either the source or target type to make it work.\n" 
++                rule.comment += "#!!!! This avc is a constraint violation.  You will need to add an attribute to either the source or target type to make it work.\n"
 +                rule.comment += "#Constraint rule: "
 +
 +            if av.type == audit2why.TERULE:
@@ -175,7 +149,7 @@ index 0e6b502..6ce892c 100644
 +                        if not self.domains:
 +                            self.domains = seinfo(ATTRIBUTE, name="domain")[0]["types"]
 +                        types=[]
-+                        
++
 +                        try:
 +                            for i in map(lambda x: x[TCONTEXT], sesearch([ALLOW], {SCONTEXT: av.src_type, CLASS: av.obj_class, PERMS: av.perms})):
 +                                if i not in self.domains:
@@ -190,41 +164,28 @@ index 0e6b502..6ce892c 100644
  
  
 diff --git a/sepolgen/src/sepolgen/refparser.py b/sepolgen/src/sepolgen/refparser.py
-index 1a2eec8..955784d 100644
+index 955784d..9a79340 100644
 --- a/sepolgen/src/sepolgen/refparser.py
 +++ b/sepolgen/src/sepolgen/refparser.py
-@@ -109,6 +109,7 @@ tokens = (
-     'DONTAUDIT',
-     'AUDITALLOW',
-     'NEVERALLOW',
-+    'PERMISSIVE',
-     'TYPE_TRANSITION',
-     'TYPE_CHANGE',
-     'TYPE_MEMBER',
-@@ -170,6 +171,7 @@ reserved = {
-     'dontaudit' : 'DONTAUDIT',
-     'auditallow' : 'AUDITALLOW',
-     'neverallow' : 'NEVERALLOW',
-+    'permissive' : 'PERMISSIVE',
-     'type_transition' : 'TYPE_TRANSITION',
-     'type_change' : 'TYPE_CHANGE',
-     'type_member' : 'TYPE_MEMBER',
-@@ -490,6 +492,7 @@ def p_policy_stmt(p):
-                    | interface_call
-                    | role_def
-                    | role_allow
-+                   | permissive
-                    | type_def
-                    | typealias_def
-                    | attribute_def
-@@ -747,6 +750,10 @@ def p_role_allow(p):
-     r.tgt_roles = p[3]
-     p[0] = r
- 
-+def p_permissive(p):
-+    'permissive : PERMISSIVE names SEMI'
-+    t.skip(1)
-+
- def p_avrule_def(p):
-     '''avrule_def : ALLOW names names COLON names names SEMI
-                   | DONTAUDIT names names COLON names names SEMI
+@@ -245,7 +245,7 @@ def t_refpolicywarn(t):
+     t.lexer.lineno += 1
+ 
+ def t_IDENTIFIER(t):
+-    r'[a-zA-Z_\$\"][a-zA-Z0-9_\-\.\$\*\"]*'
++    r'[a-zA-Z_\$\"][a-zA-Z0-9_\-\.\$\*\"~]*'
+     # Handle any keywords
+     t.type = reserved.get(t.value,'IDENTIFIER')
+     return t
+diff --git a/sepolgen/src/sepolgen/yacc.py b/sepolgen/src/sepolgen/yacc.py
+index 58332de..2f3c09d 100644
+--- a/sepolgen/src/sepolgen/yacc.py
++++ b/sepolgen/src/sepolgen/yacc.py
+@@ -594,7 +594,7 @@ class MiniProduction:
+     pass
+ 
+ # regex matching identifiers
+-_is_identifier = re.compile(r'^[a-zA-Z0-9_-]+$')
++_is_identifier = re.compile(r'^[a-zA-Z0-9_-~]+$')
+ 
+ # -----------------------------------------------------------------------------
+ # add_production()
diff --git a/policycoreutils.spec b/policycoreutils.spec
index b837719..b17eb61 100644
--- a/policycoreutils.spec
+++ b/policycoreutils.spec
@@ -2,12 +2,12 @@
 %define libsepolver 2.1.0-1
 %define	libsemanagever	2.0.46-6
 %define libselinuxver 2.0.102-6
-%define	sepolgenver	1.1.2
+%define	sepolgenver	1.1.3
 
 Summary: SELinux policy core utilities
 Name:	 policycoreutils
 Version: 2.1.4
-Release: 8%{?dist}
+Release: 9%{?dist}
 License: GPLv2
 Group:	 System Environment/Base
 # Based on git repository with tag 20101221
@@ -354,6 +354,10 @@ fi
 /bin/systemctl try-restart restorecond.service >/dev/null 2>&1 || :
 
 %changelog
+* Wed Nov 16 2011 Dan Walsh <dwalsh at redhat.com> - 2.1.8-5
+- Update to latest sepolgen
+- Allow ~ as a valid part of a filename in sepolgen
+
 * Fri Nov 11 2011 Dan Walsh <dwalsh at redhat.com> - 2.1.4-8
 - sandbox init script should always return 0
 - sandbox command needs to check range of categories and report error if not big enough
diff --git a/sources b/sources
index 464c3fe..1c2c7f4 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
 59d33101d57378ce69889cc078addf90  policycoreutils_man_ru2.tar.bz2
 7e1e18c09798ffb44913bce3d60c667d  policycoreutils-2.1.4.tgz
-c372e90a754ee87e1cc40b09134b8f31  sepolgen-1.1.2.tgz
+3bd4588bcf8608c6e8a18ad5a8b68971  sepolgen-1.1.3.tgz


More information about the scm-commits mailing list