rpms/policycoreutils/devel policycoreutils-gui.patch, 1.85, 1.86 policycoreutils-po.patch, 1.51, 1.52 policycoreutils-rhat.patch, 1.418, 1.419

Daniel J Walsh dwalsh at fedoraproject.org
Tue May 12 19:32:54 UTC 2009


Author: dwalsh

Update of /cvs/extras/rpms/policycoreutils/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31852

Modified Files:
	policycoreutils-gui.patch policycoreutils-po.patch 
	policycoreutils-rhat.patch 
Log Message:
* Wed Apr 22 2009 Dan Walsh <dwalsh at redhat.com> 2.0.62-14
- Fix audit2allow -a to retun /var/log/messages


policycoreutils-gui.patch:

Index: policycoreutils-gui.patch
===================================================================
RCS file: /cvs/extras/rpms/policycoreutils/devel/policycoreutils-gui.patch,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -p -r1.85 -r1.86
--- policycoreutils-gui.patch	7 Mar 2009 18:03:08 -0000	1.85
+++ policycoreutils-gui.patch	12 May 2009 19:32:47 -0000	1.86
@@ -1,6 +1,6 @@
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/booleansPage.py policycoreutils-2.0.62/gui/booleansPage.py
 --- nsapolicycoreutils/gui/booleansPage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/booleansPage.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/booleansPage.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,247 @@
 +#
 +# booleansPage.py - GUI for Booleans page in system-config-securitylevel
@@ -251,7 +251,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +        
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/domainsPage.py policycoreutils-2.0.62/gui/domainsPage.py
 --- nsapolicycoreutils/gui/domainsPage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/domainsPage.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/domainsPage.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,154 @@
 +## domainsPage.py - show selinux domains
 +## Copyright (C) 2009 Red Hat, Inc.
@@ -409,7 +409,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +            self.error(e.args[0])
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/fcontextPage.py policycoreutils-2.0.62/gui/fcontextPage.py
 --- nsapolicycoreutils/gui/fcontextPage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/fcontextPage.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/fcontextPage.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,223 @@
 +## fcontextPage.py - show selinux mappings
 +## Copyright (C) 2006 Red Hat, Inc.
@@ -636,7 +636,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +        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.62/gui/html_util.py
 --- nsapolicycoreutils/gui/html_util.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/html_util.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/html_util.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,164 @@
 +# Authors: John Dennis <jdennis at redhat.com>
 +#
@@ -804,7 +804,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/lockdown.glade policycoreutils-2.0.62/gui/lockdown.glade
 --- nsapolicycoreutils/gui/lockdown.glade	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/lockdown.glade	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/lockdown.glade	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,771 @@
 +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
 +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
@@ -1579,7 +1579,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +</glade-interface>
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/lockdown.gladep policycoreutils-2.0.62/gui/lockdown.gladep
 --- nsapolicycoreutils/gui/lockdown.gladep	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/lockdown.gladep	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/lockdown.gladep	2009-05-04 13:40:26.000000000 -0400
 @@ -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">
@@ -1590,7 +1590,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +</glade-project>
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/lockdown.py policycoreutils-2.0.62/gui/lockdown.py
 --- nsapolicycoreutils/gui/lockdown.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/lockdown.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/lockdown.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,382 @@
 +#!/usr/bin/python
 +#
@@ -1976,7 +1976,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +    app.stand_alone()
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/loginsPage.py policycoreutils-2.0.62/gui/loginsPage.py
 --- nsapolicycoreutils/gui/loginsPage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/loginsPage.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/loginsPage.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,185 @@
 +## loginsPage.py - show selinux mappings
 +## Copyright (C) 2006 Red Hat, Inc.
@@ -2165,7 +2165,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/Makefile policycoreutils-2.0.62/gui/Makefile
 --- nsapolicycoreutils/gui/Makefile	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/Makefile	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/Makefile	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,38 @@
 +# Installation directories.
 +PREFIX ?= ${DESTDIR}/usr
@@ -2207,7 +2207,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +relabel:
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/mappingsPage.py policycoreutils-2.0.62/gui/mappingsPage.py
 --- nsapolicycoreutils/gui/mappingsPage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/mappingsPage.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/mappingsPage.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,56 @@
 +## mappingsPage.py - show selinux mappings
 +## Copyright (C) 2006 Red Hat, Inc.
@@ -2267,7 +2267,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/modulesPage.py policycoreutils-2.0.62/gui/modulesPage.py
 --- nsapolicycoreutils/gui/modulesPage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/modulesPage.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/modulesPage.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,190 @@
 +## modulesPage.py - show selinux mappings
 +## Copyright (C) 2006-2009 Red Hat, Inc.
@@ -2461,7 +2461,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +            self.error(e.args[0])
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.glade policycoreutils-2.0.62/gui/polgen.glade
 --- nsapolicycoreutils/gui/polgen.glade	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/polgen.glade	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/polgen.glade	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,3305 @@
 +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
 +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
@@ -5770,7 +5770,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +</glade-interface>
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.gladep policycoreutils-2.0.62/gui/polgen.gladep
 --- nsapolicycoreutils/gui/polgen.gladep	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/polgen.gladep	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/polgen.gladep	2009-05-04 13:40:26.000000000 -0400
 @@ -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">
@@ -5781,8 +5781,8 @@ diff --exclude-from=exclude -N -u -r nsa
 +</glade-project>
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgengui.py policycoreutils-2.0.62/gui/polgengui.py
 --- nsapolicycoreutils/gui/polgengui.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/polgengui.py	2009-02-18 16:52:27.000000000 -0500
-@@ -0,0 +1,626 @@
++++ policycoreutils-2.0.62/gui/polgengui.py	2009-05-12 13:20:15.000000000 -0400
+@@ -0,0 +1,627 @@
 +#!/usr/bin/python -E
 +#
 +# polgengui.py - GUI for SELinux Config tool in system-config-selinux
@@ -6056,6 +6056,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +            
 +        if self.pages[type][self.current_page] in self.finish_page:
 +            self.generate_policy()
++            self.xml.get_widget ("cancel_button").set_label(gtk.STOCK_CLOSE)
 +        else:
 +            self.current_page = self.current_page + 1
 +            self.notebook.set_current_page(self.pages[type][self.current_page])
@@ -6411,7 +6412,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +    app.stand_alone()
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.py policycoreutils-2.0.62/gui/polgen.py
 --- nsapolicycoreutils/gui/polgen.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/polgen.py	2009-03-07 12:58:37.000000000 -0500
++++ policycoreutils-2.0.62/gui/polgen.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,954 @@
 +#!/usr/bin/python
 +#
@@ -7369,7 +7370,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +	
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/portsPage.py policycoreutils-2.0.62/gui/portsPage.py
 --- nsapolicycoreutils/gui/portsPage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/portsPage.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/portsPage.py	2009-05-12 13:20:08.000000000 -0400
 @@ -0,0 +1,259 @@
 +## portsPage.py - show selinux mappings
 +## Copyright (C) 2006 Red Hat, Inc.
@@ -7497,17 +7498,17 @@ diff --exclude-from=exclude -N -u -r nsa
 +        keys.sort()
 +        self.store.clear()
 +        for k in keys:
-+            if not (self.match(str(k[0]), filter) or self.match(dict[k][0], filter) or self.match(dict[k][1], filter) or self.match(dict[k][2], filter)):
++            if not (self.match(str(k[0]), filter) or self.match(dict[k][0], filter) or self.match(k[2], filter) or self.match(dict[k][1], filter) or self.match(dict[k][1], filter)):
 +                continue
 +            iter = self.store.append()
 +            if k[0] == k[1]:
 +                self.store.set_value(iter, PORT_COL, k[0])
 +            else:
-+                rec = "%s-%s" % k
++                rec = "%s-%s" % k[:2]
 +                self.store.set_value(iter, PORT_COL, rec)
 +            self.store.set_value(iter, TYPE_COL, dict[k][0])
-+            self.store.set_value(iter, PROTOCOL_COL, dict[k][1])
-+            self.store.set_value(iter, MLS_COL, dict[k][2])
++            self.store.set_value(iter, PROTOCOL_COL, k[2])
++            self.store.set_value(iter, MLS_COL, dict[k][1])
 +        self.view.get_selection().select_path ((0,))
 +    
 +    def group_load(self, filter = ""):
@@ -7632,7 +7633,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +        
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/selinux.tbl policycoreutils-2.0.62/gui/selinux.tbl
 --- nsapolicycoreutils/gui/selinux.tbl	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/selinux.tbl	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/selinux.tbl	2009-05-04 13:40:26.000000000 -0400
 @@ -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 /")
@@ -7870,7 +7871,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/semanagePage.py policycoreutils-2.0.62/gui/semanagePage.py
 --- nsapolicycoreutils/gui/semanagePage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/semanagePage.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/semanagePage.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,168 @@
 +## semanagePage.py - show selinux mappings
 +## Copyright (C) 2006 Red Hat, Inc.
@@ -8042,7 +8043,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +        
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/statusPage.py policycoreutils-2.0.62/gui/statusPage.py
 --- nsapolicycoreutils/gui/statusPage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/statusPage.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/statusPage.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,190 @@
 +# statusPage.py - show selinux status
 +## Copyright (C) 2006-2009 Red Hat, Inc.
@@ -8236,7 +8237,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinux.glade policycoreutils-2.0.62/gui/system-config-selinux.glade
 --- nsapolicycoreutils/gui/system-config-selinux.glade	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/system-config-selinux.glade	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/system-config-selinux.glade	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,3403 @@
 +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
 +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
@@ -11643,7 +11644,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +</glade-interface>
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinux.py policycoreutils-2.0.62/gui/system-config-selinux.py
 --- nsapolicycoreutils/gui/system-config-selinux.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/system-config-selinux.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/system-config-selinux.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,189 @@
 +#!/usr/bin/python
 +#
@@ -11836,7 +11837,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +    app.stand_alone()
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/boolean.py policycoreutils-2.0.62/gui/templates/boolean.py
 --- nsapolicycoreutils/gui/templates/boolean.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/templates/boolean.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/templates/boolean.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,40 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -11880,7 +11881,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/etc_rw.py policycoreutils-2.0.62/gui/templates/etc_rw.py
 --- nsapolicycoreutils/gui/templates/etc_rw.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/templates/etc_rw.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/templates/etc_rw.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,129 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -12013,7 +12014,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/executable.py policycoreutils-2.0.62/gui/templates/executable.py
 --- nsapolicycoreutils/gui/templates/executable.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/templates/executable.py	2009-03-07 12:58:20.000000000 -0500
++++ policycoreutils-2.0.62/gui/templates/executable.py	2009-05-12 13:20:40.000000000 -0400
 @@ -0,0 +1,368 @@
 +# Copyright (C) 2007-2009 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -12054,7 +12055,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +
 +te_initscript_types="""
 +type TEMPLATETYPE_initrc_exec_t;
-+init_script_type(TEMPLATETYPE_initrc_exec_t)
++init_script_file(TEMPLATETYPE_initrc_exec_t)
 +"""
 +
 +te_dbusd_types="""\
@@ -12385,7 +12386,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/__init__.py policycoreutils-2.0.62/gui/templates/__init__.py
 --- nsapolicycoreutils/gui/templates/__init__.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/templates/__init__.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/templates/__init__.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,18 @@
 +#
 +# Copyright (C) 2007 Red Hat, Inc.
@@ -12407,7 +12408,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/network.py policycoreutils-2.0.62/gui/templates/network.py
 --- nsapolicycoreutils/gui/templates/network.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/templates/network.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/templates/network.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,80 @@
 +te_port_types="""
 +type TEMPLATETYPE_port_t;
@@ -12491,7 +12492,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/rw.py policycoreutils-2.0.62/gui/templates/rw.py
 --- nsapolicycoreutils/gui/templates/rw.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/templates/rw.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/templates/rw.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,128 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -12623,7 +12624,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/script.py policycoreutils-2.0.62/gui/templates/script.py
 --- nsapolicycoreutils/gui/templates/script.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/templates/script.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/templates/script.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,99 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -12726,7 +12727,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/semodule.py policycoreutils-2.0.62/gui/templates/semodule.py
 --- nsapolicycoreutils/gui/templates/semodule.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/templates/semodule.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/templates/semodule.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,41 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -12771,7 +12772,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/tmp.py policycoreutils-2.0.62/gui/templates/tmp.py
 --- nsapolicycoreutils/gui/templates/tmp.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/templates/tmp.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/templates/tmp.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,97 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -12872,7 +12873,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/user.py policycoreutils-2.0.62/gui/templates/user.py
 --- nsapolicycoreutils/gui/templates/user.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/templates/user.py	2009-03-07 12:58:11.000000000 -0500
++++ policycoreutils-2.0.62/gui/templates/user.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,182 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -13058,7 +13059,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_lib.py policycoreutils-2.0.62/gui/templates/var_lib.py
 --- nsapolicycoreutils/gui/templates/var_lib.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/templates/var_lib.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/templates/var_lib.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,158 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -13220,7 +13221,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_log.py policycoreutils-2.0.62/gui/templates/var_log.py
 --- nsapolicycoreutils/gui/templates/var_log.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/templates/var_log.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/templates/var_log.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,110 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -13334,7 +13335,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_run.py policycoreutils-2.0.62/gui/templates/var_run.py
 --- nsapolicycoreutils/gui/templates/var_run.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/templates/var_run.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/templates/var_run.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,118 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -13456,7 +13457,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_spool.py policycoreutils-2.0.62/gui/templates/var_spool.py
 --- nsapolicycoreutils/gui/templates/var_spool.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/templates/var_spool.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/templates/var_spool.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,129 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -13589,7 +13590,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/translationsPage.py policycoreutils-2.0.62/gui/translationsPage.py
 --- nsapolicycoreutils/gui/translationsPage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/translationsPage.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/translationsPage.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,118 @@
 +## translationsPage.py - show selinux translations
 +## Copyright (C) 2006 Red Hat, Inc.
@@ -13711,7 +13712,7 @@ diff --exclude-from=exclude -N -u -r nsa
 +        self.store.set_value(iter, 1, translation)
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/usersPage.py policycoreutils-2.0.62/gui/usersPage.py
 --- nsapolicycoreutils/gui/usersPage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/gui/usersPage.py	2009-02-18 16:52:27.000000000 -0500
++++ policycoreutils-2.0.62/gui/usersPage.py	2009-05-04 13:40:26.000000000 -0400
 @@ -0,0 +1,150 @@
 +## usersPage.py - show selinux mappings
 +## Copyright (C) 2006,2007,2008 Red Hat, Inc.

policycoreutils-po.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -p -N -r 1.51 -r 1.52 policycoreutils-po.patch
Index: policycoreutils-po.patch
===================================================================
RCS file: /cvs/extras/rpms/policycoreutils/devel/policycoreutils-po.patch,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -p -r1.51 -r1.52
--- policycoreutils-po.patch	9 Apr 2009 02:05:21 -0000	1.51
+++ policycoreutils-po.patch	12 May 2009 19:32:47 -0000	1.52
@@ -1,7 +1,6 @@
-Binary files nsapolicycoreutils/po/af.mo and policycoreutils-2.0.62/po/af.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/af.po policycoreutils-2.0.62/po/af.po
 --- nsapolicycoreutils/po/af.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/af.po	2009-04-08 22:03:17.000000000 -0400
++++ policycoreutils-2.0.62/po/af.po	2009-05-12 13:25:30.000000000 -0400
 @@ -8,7 +8,7 @@
  msgstr ""
  "Project-Id-Version: PACKAGE VERSION\n"
@@ -1942,10 +1941,9 @@ diff --exclude-from=exclude -N -u -r nsa
  #: ../gui/translationsPage.py:53
  msgid "Sensitvity Level"
  msgstr ""
-Binary files nsapolicycoreutils/po/am.mo and policycoreutils-2.0.62/po/am.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/am.po policycoreutils-2.0.62/po/am.po
 --- nsapolicycoreutils/po/am.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/am.po	2009-04-08 22:03:17.000000000 -0400
++++ policycoreutils-2.0.62/po/am.po	2009-05-12 13:25:30.000000000 -0400
 @@ -8,7 +8,7 @@
  msgstr ""
  "Project-Id-Version: PACKAGE VERSION\n"
@@ -3886,10 +3884,9 @@ diff --exclude-from=exclude -N -u -r nsa
  #: ../gui/translationsPage.py:53
  msgid "Sensitvity Level"
  msgstr ""
-Binary files nsapolicycoreutils/po/ar.mo and policycoreutils-2.0.62/po/ar.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/ar.po policycoreutils-2.0.62/po/ar.po
 --- nsapolicycoreutils/po/ar.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/ar.po	2009-04-08 22:03:17.000000000 -0400
++++ policycoreutils-2.0.62/po/ar.po	2009-05-12 13:25:30.000000000 -0400
 @@ -8,7 +8,7 @@
  msgstr ""
  "Project-Id-Version: PACKAGE VERSION\n"
@@ -5830,10 +5827,9 @@ diff --exclude-from=exclude -N -u -r nsa
  #: ../gui/translationsPage.py:53
  msgid "Sensitvity Level"
  msgstr ""
-Binary files nsapolicycoreutils/po/as.mo and policycoreutils-2.0.62/po/as.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/as.po policycoreutils-2.0.62/po/as.po
 --- nsapolicycoreutils/po/as.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/as.po	2009-04-08 22:03:17.000000000 -0400
++++ policycoreutils-2.0.62/po/as.po	2009-05-12 13:25:30.000000000 -0400
 @@ -1,4 +1,4 @@
 -# translation of as.po to Assamese
 +# translation of policycoreutils.HEAD.po to Assamese
@@ -8218,10 +8214,9 @@ diff --exclude-from=exclude -N -u -r nsa
 -#~ msgstr "স্তৰ"
 +#~ msgid "translations not supported on non-MLS machines"
 +#~ msgstr "MLS-বিহীন যন্ত্ৰত অনুবাদ সমৰ্থন কৰা নহয়"
-Binary files nsapolicycoreutils/po/be.mo and policycoreutils-2.0.62/po/be.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/be.po policycoreutils-2.0.62/po/be.po
 --- nsapolicycoreutils/po/be.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/be.po	2009-04-08 22:03:17.000000000 -0400
++++ policycoreutils-2.0.62/po/be.po	2009-05-12 13:25:30.000000000 -0400
 @@ -8,7 +8,7 @@
  msgstr ""
  "Project-Id-Version: PACKAGE VERSION\n"
@@ -10162,10 +10157,9 @@ diff --exclude-from=exclude -N -u -r nsa
  #: ../gui/translationsPage.py:53
  msgid "Sensitvity Level"
  msgstr ""
-Binary files nsapolicycoreutils/po/bg.mo and policycoreutils-2.0.62/po/bg.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/bg.po policycoreutils-2.0.62/po/bg.po
 --- nsapolicycoreutils/po/bg.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/bg.po	2009-04-08 22:03:17.000000000 -0400
++++ policycoreutils-2.0.62/po/bg.po	2009-05-12 13:25:30.000000000 -0400
 @@ -8,7 +8,7 @@
  msgstr ""
  "Project-Id-Version: policycoreutils\n"
@@ -12215,10 +12209,9 @@ diff --exclude-from=exclude -N -u -r nsa
  #~ msgid "Requires value"
  #~ msgstr "Изисква стойност"
  
-Binary files nsapolicycoreutils/po/bn_IN.mo and policycoreutils-2.0.62/po/bn_IN.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/bn_IN.po policycoreutils-2.0.62/po/bn_IN.po
 --- nsapolicycoreutils/po/bn_IN.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/bn_IN.po	2009-04-08 22:03:17.000000000 -0400
++++ policycoreutils-2.0.62/po/bn_IN.po	2009-05-12 13:25:30.000000000 -0400
 @@ -9,7 +9,7 @@
  msgstr ""
  "Project-Id-Version: policycoreutils.HEAD\n"
@@ -14243,10 +14236,9 @@ diff --exclude-from=exclude -N -u -r nsa
  #~ msgid "Requires value"
  #~ msgstr "মান আবশ্যক"
  
-Binary files nsapolicycoreutils/po/bn.mo and policycoreutils-2.0.62/po/bn.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/bn.po policycoreutils-2.0.62/po/bn.po
 --- nsapolicycoreutils/po/bn.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/bn.po	2009-04-08 22:03:17.000000000 -0400
++++ policycoreutils-2.0.62/po/bn.po	2009-05-12 13:25:30.000000000 -0400
 @@ -8,7 +8,7 @@
  msgstr ""
  "Project-Id-Version: PACKAGE VERSION\n"
@@ -16187,10 +16179,9 @@ diff --exclude-from=exclude -N -u -r nsa
  #: ../gui/translationsPage.py:53
  msgid "Sensitvity Level"
  msgstr ""
-Binary files nsapolicycoreutils/po/bs.mo and policycoreutils-2.0.62/po/bs.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/bs.po policycoreutils-2.0.62/po/bs.po
 --- nsapolicycoreutils/po/bs.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/bs.po	2009-04-08 22:03:17.000000000 -0400
++++ policycoreutils-2.0.62/po/bs.po	2009-05-12 13:25:30.000000000 -0400
 @@ -4,7 +4,7 @@
  msgstr ""
  "Project-Id-Version: bs\n"
@@ -18170,10 +18161,9 @@ diff --exclude-from=exclude -N -u -r nsa
  #~ msgid "Requires value"
  #~ msgstr "Zahtijeva vrijednost"
  
-Binary files nsapolicycoreutils/po/ca.mo and policycoreutils-2.0.62/po/ca.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/ca.po policycoreutils-2.0.62/po/ca.po
 --- nsapolicycoreutils/po/ca.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/ca.po	2009-04-08 22:03:17.000000000 -0400
++++ policycoreutils-2.0.62/po/ca.po	2009-05-12 13:25:30.000000000 -0400
 @@ -22,7 +22,7 @@
  msgstr ""
  "Project-Id-Version: policycoreutils\n"
@@ -20163,10 +20153,9 @@ diff --exclude-from=exclude -N -u -r nsa
  #~ msgid "Requires value"
  #~ msgstr "Requereix un valor"
  
-Binary files nsapolicycoreutils/po/cs.mo and policycoreutils-2.0.62/po/cs.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/cs.po policycoreutils-2.0.62/po/cs.po
 --- nsapolicycoreutils/po/cs.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/cs.po	2009-04-08 22:03:17.000000000 -0400
++++ policycoreutils-2.0.62/po/cs.po	2009-05-12 13:25:30.000000000 -0400
 @@ -9,7 +9,7 @@
  msgstr ""
  "Project-Id-Version: cs\n"
@@ -22186,10 +22175,9 @@ diff --exclude-from=exclude -N -u -r nsa
  #~ msgid "<b>Device number:</b>"
  #~ msgstr "<b>Číslo zařízení:</b>"
  
-Binary files nsapolicycoreutils/po/cy.mo and policycoreutils-2.0.62/po/cy.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/cy.po policycoreutils-2.0.62/po/cy.po
 --- nsapolicycoreutils/po/cy.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/cy.po	2009-04-08 22:03:17.000000000 -0400
++++ policycoreutils-2.0.62/po/cy.po	2009-05-12 13:25:30.000000000 -0400
 @@ -8,7 +8,7 @@
  msgstr ""
  "Project-Id-Version: PACKAGE VERSION\n"
@@ -24130,10 +24118,9 @@ diff --exclude-from=exclude -N -u -r nsa
  #: ../gui/translationsPage.py:53
  msgid "Sensitvity Level"
  msgstr ""
-Binary files nsapolicycoreutils/po/da.mo and policycoreutils-2.0.62/po/da.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/da.po policycoreutils-2.0.62/po/da.po
 --- nsapolicycoreutils/po/da.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/da.po	2009-04-08 22:03:17.000000000 -0400
++++ policycoreutils-2.0.62/po/da.po	2009-05-12 13:25:30.000000000 -0400
 @@ -2,7 +2,7 @@
  # Danish messages for policycoreutils.
  # Copyright (C) 2006 Christian Rose.
@@ -26124,10 +26111,9 @@ diff --exclude-from=exclude -N -u -r nsa
  #~ msgid "Requires value"
  #~ msgstr "Kræver værdi"
  
-Binary files nsapolicycoreutils/po/de.mo and policycoreutils-2.0.62/po/de.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/de.po policycoreutils-2.0.62/po/de.po
 --- nsapolicycoreutils/po/de.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/de.po	2009-04-08 22:03:17.000000000 -0400
++++ policycoreutils-2.0.62/po/de.po	2009-05-12 13:25:30.000000000 -0400
 @@ -1,30 +1,26 @@
 -# translation of policycoreutils.HEAD.de.po to German
  # German translation of policycoreutils.
@@ -29596,10 +29582,9 @@ diff --exclude-from=exclude -N -u -r nsa
 +#~ "\n"
 +#~ "semodule -i %s\n"
 +#~ "\n"
-Binary files nsapolicycoreutils/po/el.mo and policycoreutils-2.0.62/po/el.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/el.po policycoreutils-2.0.62/po/el.po
 --- nsapolicycoreutils/po/el.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/el.po	2009-04-08 22:03:17.000000000 -0400
++++ policycoreutils-2.0.62/po/el.po	2009-05-12 13:25:30.000000000 -0400
 @@ -8,7 +8,7 @@
  msgstr ""
  "Project-Id-Version: el\n"
@@ -31615,10 +31600,9 @@ diff --exclude-from=exclude -N -u -r nsa
  #~ msgid "Requires value"
  #~ msgstr "Απόκρυψη τιμής"
  
-Binary files nsapolicycoreutils/po/en_GB.mo and policycoreutils-2.0.62/po/en_GB.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/en_GB.po policycoreutils-2.0.62/po/en_GB.po
 --- nsapolicycoreutils/po/en_GB.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/en_GB.po	2009-04-08 22:03:17.000000000 -0400
++++ policycoreutils-2.0.62/po/en_GB.po	2009-05-12 13:25:30.000000000 -0400
 @@ -7,7 +7,7 @@
  msgstr ""
  "Project-Id-Version: policycoreutils\n"
@@ -33598,10 +33582,9 @@ diff --exclude-from=exclude -N -u -r nsa
  #~ msgid "Requires value"
  #~ msgstr "Requires value"
[...2394 lines suppressed...]
-Binary files nsapolicycoreutils/po/si.mo and policycoreutils-2.0.62/po/si.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/si.po policycoreutils-2.0.62/po/si.po
 --- nsapolicycoreutils/po/si.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/si.po	2009-04-08 22:03:17.000000000 -0400
++++ policycoreutils-2.0.62/po/si.po	2009-05-12 13:25:30.000000000 -0400
 @@ -8,7 +8,7 @@
  msgstr ""
  "Project-Id-Version: PACKAGE VERSION\n"
@@ -137788,10 +137984,9 @@ diff --exclude-from=exclude -N -u -r nsa
  #: ../gui/translationsPage.py:53
  msgid "Sensitvity Level"
  msgstr ""
-Binary files nsapolicycoreutils/po/sk.mo and policycoreutils-2.0.62/po/sk.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/sk.po policycoreutils-2.0.62/po/sk.po
 --- nsapolicycoreutils/po/sk.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/sk.po	2009-04-08 22:03:17.000000000 -0400
++++ policycoreutils-2.0.62/po/sk.po	2009-05-12 13:25:30.000000000 -0400
 @@ -7,7 +7,7 @@
  msgstr ""
  "Project-Id-Version: policycoreutils\n"
@@ -139773,10 +139968,9 @@ diff --exclude-from=exclude -N -u -r nsa
  #~ msgid "Requires value"
  #~ msgstr "Požaduje hodnotu"
  
-Binary files nsapolicycoreutils/po/sl.mo and policycoreutils-2.0.62/po/sl.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/sl.po policycoreutils-2.0.62/po/sl.po
 --- nsapolicycoreutils/po/sl.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/sl.po	2009-04-08 22:03:17.000000000 -0400
++++ policycoreutils-2.0.62/po/sl.po	2009-05-12 13:25:30.000000000 -0400
 @@ -8,7 +8,7 @@
  msgstr ""
  "Project-Id-Version: PACKAGE VERSION\n"
@@ -141717,10 +141911,9 @@ diff --exclude-from=exclude -N -u -r nsa
  #: ../gui/translationsPage.py:53
  msgid "Sensitvity Level"
  msgstr ""
-Binary files nsapolicycoreutils/po/sq.mo and policycoreutils-2.0.62/po/sq.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/sq.po policycoreutils-2.0.62/po/sq.po
 --- nsapolicycoreutils/po/sq.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/sq.po	2009-04-08 22:03:17.000000000 -0400
++++ policycoreutils-2.0.62/po/sq.po	2009-05-12 13:25:30.000000000 -0400
 @@ -8,7 +8,7 @@
  msgstr ""
  "Project-Id-Version: PACKAGE VERSION\n"
@@ -143661,10 +143854,9 @@ diff --exclude-from=exclude -N -u -r nsa
  #: ../gui/translationsPage.py:53
  msgid "Sensitvity Level"
  msgstr ""
-Binary files nsapolicycoreutils/po/sr at latin.mo and policycoreutils-2.0.62/po/sr at latin.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/sr at latin.po policycoreutils-2.0.62/po/sr at latin.po
 --- nsapolicycoreutils/po/sr at latin.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/sr at latin.po	2009-04-08 22:03:18.000000000 -0400
++++ policycoreutils-2.0.62/po/sr at latin.po	2009-05-12 13:25:30.000000000 -0400
 @@ -1,26 +1,24 @@
 -# translation of policycoreutils.HEAD.sr.po to Serbian
  # Serbian(Latin) translations for policycoreutils
@@ -146046,10 +146238,9 @@ diff --exclude-from=exclude -N -u -r nsa
 -#~ "Primoravanje\n"
 -#~ "Dopuštanje\n"
 -#~ "Isključeno\n"
-Binary files nsapolicycoreutils/po/sr.mo and policycoreutils-2.0.62/po/sr.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/sr.po policycoreutils-2.0.62/po/sr.po
 --- nsapolicycoreutils/po/sr.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/sr.po	2009-04-08 22:03:18.000000000 -0400
++++ policycoreutils-2.0.62/po/sr.po	2009-05-12 13:25:30.000000000 -0400
 @@ -1,26 +1,24 @@
 -# translation of policycoreutils.HEAD.sr.po to Serbian
  # Serbian translations for policycoreutils
@@ -148370,10 +148561,9 @@ diff --exclude-from=exclude -N -u -r nsa
 -#~ "Приморавање\n"
 -#~ "Допуштање\n"
 -#~ "Искључено\n"
-Binary files nsapolicycoreutils/po/sv.mo and policycoreutils-2.0.62/po/sv.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/sv.po policycoreutils-2.0.62/po/sv.po
 --- nsapolicycoreutils/po/sv.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/sv.po	2009-04-08 22:03:18.000000000 -0400
++++ policycoreutils-2.0.62/po/sv.po	2009-05-12 13:25:31.000000000 -0400
 @@ -1,16 +1,18 @@
  # Swedish messages for policycoreutils.
 -# Copyright © 2001-2008 Free Software Foundation, Inc.
@@ -151563,10 +151753,9 @@ diff --exclude-from=exclude -N -u -r nsa
 -
 -#~ msgid "Options Error: %s "
 -#~ msgstr "Flaggfel: %s "
-Binary files nsapolicycoreutils/po/ta.mo and policycoreutils-2.0.62/po/ta.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/ta.po policycoreutils-2.0.62/po/ta.po
 --- nsapolicycoreutils/po/ta.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/ta.po	2009-04-08 22:03:18.000000000 -0400
++++ policycoreutils-2.0.62/po/ta.po	2009-05-12 13:25:31.000000000 -0400
 @@ -1,22 +1,27 @@
 -# translation of ta.po to Tamil
 +# translation of policycoreutils.HEAD.ta.po to Tamil
@@ -153997,10 +154186,9 @@ diff --exclude-from=exclude -N -u -r nsa
 -#~ msgstr ""
 -#~ "MLS/\n"
 -#~ "MCS நிலை"
-Binary files nsapolicycoreutils/po/te.mo and policycoreutils-2.0.62/po/te.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/te.po policycoreutils-2.0.62/po/te.po
 --- nsapolicycoreutils/po/te.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/te.po	2009-04-08 22:03:18.000000000 -0400
++++ policycoreutils-2.0.62/po/te.po	2009-05-12 13:25:31.000000000 -0400
 @@ -1,21 +1,23 @@
 -# translation of new_policycoreutils.HEAD.te.po to Telugu
 +# translation of policycoreutils.HEAD.te.po to Telugu
@@ -156284,10 +156472,9 @@ diff --exclude-from=exclude -N -u -r nsa
 -#~ "బలవంతపు\n"
 -#~ "అనుమతిగల\n"
 -#~ "అచేతనమైన\n"
-Binary files nsapolicycoreutils/po/th.mo and policycoreutils-2.0.62/po/th.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/th.po policycoreutils-2.0.62/po/th.po
 --- nsapolicycoreutils/po/th.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/th.po	2009-04-08 22:03:18.000000000 -0400
++++ policycoreutils-2.0.62/po/th.po	2009-05-12 13:25:31.000000000 -0400
 @@ -8,7 +8,7 @@
  msgstr ""
  "Project-Id-Version: PACKAGE VERSION\n"
@@ -158228,10 +158415,9 @@ diff --exclude-from=exclude -N -u -r nsa
  #: ../gui/translationsPage.py:53
  msgid "Sensitvity Level"
  msgstr ""
-Binary files nsapolicycoreutils/po/tr.mo and policycoreutils-2.0.62/po/tr.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/tr.po policycoreutils-2.0.62/po/tr.po
 --- nsapolicycoreutils/po/tr.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/tr.po	2009-04-08 22:03:18.000000000 -0400
++++ policycoreutils-2.0.62/po/tr.po	2009-05-12 13:25:31.000000000 -0400
 @@ -8,7 +8,7 @@
  msgstr ""
  "Project-Id-Version: PACKAGE VERSION\n"
@@ -160172,10 +160358,9 @@ diff --exclude-from=exclude -N -u -r nsa
  #: ../gui/translationsPage.py:53
  msgid "Sensitvity Level"
  msgstr ""
-Binary files nsapolicycoreutils/po/uk.mo and policycoreutils-2.0.62/po/uk.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/uk.po policycoreutils-2.0.62/po/uk.po
 --- nsapolicycoreutils/po/uk.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/uk.po	2009-04-08 22:03:18.000000000 -0400
++++ policycoreutils-2.0.62/po/uk.po	2009-05-12 13:25:31.000000000 -0400
 @@ -7,7 +7,7 @@
  msgstr ""
  "Project-Id-Version: policycoreutils\n"
@@ -162156,10 +162341,9 @@ diff --exclude-from=exclude -N -u -r nsa
  #~ msgid "Requires value"
  #~ msgstr "Потрібно вказати значення"
  
-Binary files nsapolicycoreutils/po/ur.mo and policycoreutils-2.0.62/po/ur.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/ur.po policycoreutils-2.0.62/po/ur.po
 --- nsapolicycoreutils/po/ur.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/ur.po	2009-04-08 22:03:18.000000000 -0400
++++ policycoreutils-2.0.62/po/ur.po	2009-05-12 13:25:31.000000000 -0400
 @@ -8,7 +8,7 @@
  msgstr ""
  "Project-Id-Version: PACKAGE VERSION\n"
@@ -164100,10 +164284,9 @@ diff --exclude-from=exclude -N -u -r nsa
  #: ../gui/translationsPage.py:53
  msgid "Sensitvity Level"
  msgstr ""
-Binary files nsapolicycoreutils/po/vi.mo and policycoreutils-2.0.62/po/vi.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/vi.po policycoreutils-2.0.62/po/vi.po
 --- nsapolicycoreutils/po/vi.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/vi.po	2009-04-08 22:03:18.000000000 -0400
++++ policycoreutils-2.0.62/po/vi.po	2009-05-12 13:25:31.000000000 -0400
 @@ -8,7 +8,7 @@
  msgstr ""
  "Project-Id-Version: PACKAGE VERSION\n"
@@ -166044,10 +166227,9 @@ diff --exclude-from=exclude -N -u -r nsa
  #: ../gui/translationsPage.py:53
  msgid "Sensitvity Level"
  msgstr ""
-Binary files nsapolicycoreutils/po/zh_CN.mo and policycoreutils-2.0.62/po/zh_CN.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/zh_CN.po policycoreutils-2.0.62/po/zh_CN.po
 --- nsapolicycoreutils/po/zh_CN.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/zh_CN.po	2009-04-08 22:03:18.000000000 -0400
++++ policycoreutils-2.0.62/po/zh_CN.po	2009-05-12 13:25:31.000000000 -0400
 @@ -3,13 +3,13 @@
  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER, 2006.
  #
@@ -168622,10 +168804,9 @@ diff --exclude-from=exclude -N -u -r nsa
  
  #: ../gui/translationsPage.py:53
  msgid "Sensitvity Level"
-Binary files nsapolicycoreutils/po/zh_TW.mo and policycoreutils-2.0.62/po/zh_TW.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/zh_TW.po policycoreutils-2.0.62/po/zh_TW.po
 --- nsapolicycoreutils/po/zh_TW.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/zh_TW.po	2009-04-08 22:03:18.000000000 -0400
++++ policycoreutils-2.0.62/po/zh_TW.po	2009-05-12 13:25:31.000000000 -0400
 @@ -1,32 +1,31 @@
 -# translation of policycoreutils.HEAD.po to Traditional Chinese
 +# translation of policycoreutils.HEAD.po to
@@ -173721,10 +173902,9 @@ diff --exclude-from=exclude -N -u -r nsa
 +msgid "SELinux user '%s' is required"
 +msgstr "需要 SELinux 用戶「%s」"
  
-Binary files nsapolicycoreutils/po/zu.mo and policycoreutils-2.0.62/po/zu.mo differ
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/po/zu.po policycoreutils-2.0.62/po/zu.po
 --- nsapolicycoreutils/po/zu.po	2008-09-22 13:25:06.000000000 -0400
-+++ policycoreutils-2.0.62/po/zu.po	2009-04-08 22:03:18.000000000 -0400
++++ policycoreutils-2.0.62/po/zu.po	2009-05-12 13:25:31.000000000 -0400
 @@ -8,7 +8,7 @@
  msgstr ""
  "Project-Id-Version: PACKAGE VERSION\n"

policycoreutils-rhat.patch:

Index: policycoreutils-rhat.patch
===================================================================
RCS file: /cvs/extras/rpms/policycoreutils/devel/policycoreutils-rhat.patch,v
retrieving revision 1.418
retrieving revision 1.419
diff -u -p -r1.418 -r1.419
--- policycoreutils-rhat.patch	5 May 2009 19:50:40 -0000	1.418
+++ policycoreutils-rhat.patch	12 May 2009 19:32:50 -0000	1.419
@@ -20,8 +20,8 @@ diff --exclude-from=exclude --exclude=se
  
 diff --exclude-from=exclude --exclude=sepolgen-1.0.16 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/Makefile policycoreutils-2.0.62/restorecond/Makefile
 --- nsapolicycoreutils/restorecond/Makefile	2009-02-18 16:44:47.000000000 -0500
-+++ policycoreutils-2.0.62/restorecond/Makefile	2009-05-05 15:49:19.000000000 -0400
-@@ -2,16 +2,21 @@
++++ policycoreutils-2.0.62/restorecond/Makefile	2009-05-12 15:17:52.000000000 -0400
+@@ -2,16 +2,23 @@
  PREFIX ?= ${DESTDIR}/usr
  SBINDIR ?= $(PREFIX)/sbin
  MANDIR = $(PREFIX)/share/man
@@ -42,11 +42,13 @@ diff --exclude-from=exclude --exclude=se
  all: restorecond
  
 -restorecond:  restorecond.o utmpwatcher.o stringslist.o
-+restorecond:  restorecond.o stringslist.o user.o
++restorecond.o utmpwatcher.o stringslist.o user.o watch.o: restorecond.h 
++
++restorecond:  restorecond.o utmpwatcher.o stringslist.o user.o watch.o
  	$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
  
  install: all
-@@ -22,7 +27,12 @@
+@@ -22,7 +29,12 @@
  	-mkdir -p $(INITDIR)
  	install -m 755 restorecond.init $(INITDIR)/restorecond
  	-mkdir -p $(SELINUXDIR)
@@ -54,7 +56,7 @@ diff --exclude-from=exclude --exclude=se
 +	install -m 644 restorecond.conf $(SELINUXDIR)/restorecond.conf
 +	install -m 644 restorecond_user.conf $(SELINUXDIR)/restorecond_user.conf
 +	-mkdir -p $(AUTOSTARTDIR)
-+	install -m 600 restorecond.desktop $(AUTOSTARTDIR)/restorecond.desktop
++	install -m 644 restorecond.desktop $(AUTOSTARTDIR)/restorecond.desktop
 +	-mkdir -p $(DBUSSERVICEDIR)
 +	install -m 600 org.selinux.Restorecond.service  $(DBUSSERVICEDIR)/org.selinux.Restorecond.service
  
@@ -69,128 +71,290 @@ diff --exclude-from=exclude --exclude=se
 +Exec=/usr/sbin/restorecond -u
 diff --exclude-from=exclude --exclude=sepolgen-1.0.16 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.c policycoreutils-2.0.62/restorecond/restorecond.c
 --- nsapolicycoreutils/restorecond/restorecond.c	2009-02-18 16:44:47.000000000 -0500
-+++ policycoreutils-2.0.62/restorecond/restorecond.c	2009-05-04 13:40:26.000000000 -0400
-@@ -54,25 +54,31 @@
++++ policycoreutils-2.0.62/restorecond/restorecond.c	2009-05-12 15:18:05.000000000 -0400
+@@ -48,294 +48,37 @@
+ #include <signal.h>
+ #include <string.h>
+ #include <unistd.h>
+-#include <ctype.h>
+ #include <sys/types.h>
+-#include <sys/stat.h>
  #include <syslog.h>
  #include <limits.h>
- #include <fcntl.h>
 +#include <pwd.h>
-+#include <glob.h>
- 
++#include <sys/stat.h>
++#include <string.h>
++#include <stdio.h>
+ #include <fcntl.h>
+-
  #include "restorecond.h"
- #include "stringslist.h"
--#include "utmpwatcher.h"
+-#include "stringslist.h"
+ #include "utmpwatcher.h"
  
-+extern int start(void);
-+extern int server(int);
- extern char *dirname(char *path);
+-extern char *dirname(char *path);
++const char *homedir;
  static int master_fd = -1;
- static int master_wd = -1;
- static int terminate = 0;
- 
-+static char *server_watch_file  = "/etc/selinux/restorecond.conf";
-+static char *user_watch_file  = "/etc/selinux/restorecond_user.conf";
-+static char *watch_file;
-+
- #include <selinux/selinux.h>
+-static int master_wd = -1;
+-static int terminate = 0;
+-
+-#include <selinux/selinux.h>
 -#include <utmp.h>
- 
- /* size of the event structure, not counting name */
- #define EVENT_SIZE  (sizeof (struct inotify_event))
- /* reasonable guess as to size of 1024 events */
- #define BUF_LEN        (1024 * (EVENT_SIZE + 16))
- 
+-
+-/* size of the event structure, not counting name */
+-#define EVENT_SIZE  (sizeof (struct inotify_event))
+-/* reasonable guess as to size of 1024 events */
+-#define BUF_LEN        (1024 * (EVENT_SIZE + 16))
+-
 -static int debug_mode = 0;
-+int debug_mode = 0;
- static int verbose_mode = 0;
- 
- static void restore(const char *filename, int exact);
-@@ -104,7 +110,7 @@
-    see if it is one that we are watching.
- */
- 
+-static int verbose_mode = 0;
+-
+-static void restore(const char *filename, int exact);
+-
+-struct watchList {
+-	struct watchList *next;
+-	int wd;
+-	char *dir;
+-	struct stringsList *files;
+-};
+-struct watchList *firstDir = NULL;
+-
+-/* Compare two contexts to see if their differences are "significant",
+- * or whether the only difference is in the user. */
+-static int only_changed_user(const char *a, const char *b)
+-{
+-	char *rest_a, *rest_b;	/* Rest of the context after the user */
+-	if (!a || !b)
+-		return 0;
+-	rest_a = strchr(a, ':');
+-	rest_b = strchr(b, ':');
+-	if (!rest_a || !rest_b)
+-		return 0;
+-	return (strcmp(rest_a, rest_b) == 0);
+-}
+-
+-/* 
+-   A file was in a direcroty has been created. This function checks to 
+-   see if it is one that we are watching.
+-*/
+-
 -static int watch_list_find(int wd, const char *file)
-+int watch_list_find(int wd, const char *file)
- {
- 	struct watchList *ptr = NULL;
- 	ptr = firstDir;
-@@ -135,7 +141,7 @@
- 	return -1;
- }
- 
+-{
+-	struct watchList *ptr = NULL;
+-	ptr = firstDir;
+-
+-	if (debug_mode)
+-		printf("%d: File=%s\n", wd, file);
+-	while (ptr != NULL) {
+-		if (ptr->wd == wd) {
+-			int exact=0;
+-			if (strings_list_find(ptr->files, file, &exact) == 0) {
+-				char *path = NULL;
+-				if (asprintf(&path, "%s/%s", ptr->dir, file) <
+-				    0)
+-					exitApp("Error allocating memory.");
+-				restore(path, exact);
+-				free(path);
+-				return 0;
+-			}
+-			if (debug_mode)
+-				strings_list_print(ptr->files);
+-
+-			/* Not found in this directory */
+-			return -1;
+-		}
+-		ptr = ptr->next;
+-	}
+-	/* Did not find a directory */
+-	return -1;
+-}
+-
 -static void watch_list_free(int fd)
-+void watch_list_free(int fd)
- {
- 	struct watchList *ptr = NULL;
- 	struct watchList *prev = NULL;
-@@ -152,6 +158,12 @@
- 	firstDir = NULL;
- }
- 
-+static void done(void) {
-+	watch_list_free(master_fd);
-+	close(master_fd);
-+	matchpathcon_fini();
-+}
-+
- /* 
-    Set the file context to the default file context for this system.
-    Same as restorecon.
-@@ -241,6 +253,8 @@
- {
- 	char *line_buf = NULL;
- 	size_t len = 0;
-+	uid_t uid = getuid();
-+	struct passwd *pwd = getpwuid(uid);
+-{
+-	struct watchList *ptr = NULL;
+-	struct watchList *prev = NULL;
+-	ptr = firstDir;
+-
+-	while (ptr != NULL) {
+-		inotify_rm_watch(fd, ptr->wd);
+-		strings_list_free(ptr->files);
+-		free(ptr->dir);
+-		prev = ptr;
+-		ptr = ptr->next;
+-		free(prev);
+-	}
+-	firstDir = NULL;
+-}
  
- 	while (getline(&line_buf, &len, cfg) > 0) {
- 		char *buffer = line_buf;
-@@ -252,8 +266,12 @@
- 		if (l <= 0)
- 			continue;
- 		buffer[l] = 0;
+-/* 
+-   Set the file context to the default file context for this system.
+-   Same as restorecon.
+-*/
+-static void restore(const char *filename, int exact)
+-{
+-	int retcontext = 0;
+-	security_context_t scontext = NULL;
+-	security_context_t prev_context = NULL;
+-	struct stat st;
+-	int fd = -1;
+-	if (debug_mode)
+-		printf("restore %s\n", filename);
+-
+-	fd = open(filename, O_NOFOLLOW | O_RDONLY);
+-	if (fd < 0) {
+-		if (verbose_mode)
+-			syslog(LOG_ERR, "Unable to open file (%s) %s\n",
+-			       filename, strerror(errno));
+-		return;
+-	}
+-
+-	if (fstat(fd, &st) != 0) {
+-		syslog(LOG_ERR, "Unable to stat file (%s) %s\n", filename,
+-		       strerror(errno));
+-		close(fd);
+-		return;
+-	}
+-
+-	if (!(st.st_mode & S_IFDIR) && st.st_nlink > 1) {
+-		if (exact) { 
+-			syslog(LOG_ERR,
+-			       "Will not restore a file with more than one hard link (%s) %s\n",
+-			       filename, strerror(errno));
+-		}
+-		close(fd);
+-		return;
+-	}
+-
+-	if (matchpathcon(filename, st.st_mode, &scontext) < 0) {
+-		if (errno == ENOENT)
+-			return;
+-		syslog(LOG_ERR, "matchpathcon(%s) failed %s\n", filename,
+-		       strerror(errno));
+-		return;
+-	}
+-	retcontext = fgetfilecon_raw(fd, &prev_context);
+-
+-	if (retcontext >= 0 || errno == ENODATA) {
+-		if (retcontext < 0)
+-			prev_context = NULL;
+-		if (retcontext < 0 || (strcmp(prev_context, scontext) != 0)) {
+-
+-			if (only_changed_user(scontext, prev_context) != 0) {
+-				free(scontext);
+-				free(prev_context);
+-				close(fd);
+-				return;
+-			}
+-
+-			if (fsetfilecon(fd, scontext) < 0) {
+-				if (errno != EOPNOTSUPP) 
+-					syslog(LOG_ERR,
+-					       "set context %s->%s failed:'%s'\n",
+-					       filename, scontext, strerror(errno));
+-				if (retcontext >= 0)
+-					free(prev_context);
+-				free(scontext);
+-				close(fd);
+-				return;
+-			}
+-			syslog(LOG_WARNING, "Reset file context %s: %s->%s\n",
+-			       filename, prev_context, scontext);
+-		}
+-		if (retcontext >= 0)
+-			free(prev_context);
+-	} else {
+-		if (errno != EOPNOTSUPP) 
+-			syslog(LOG_ERR, "get context on %s failed: '%s'\n",
+-			       filename, strerror(errno));
+-	}
+-	free(scontext);
+-	close(fd);
+-}
+-
+-static void process_config(int fd, FILE * cfg)
+-{
+-	char *line_buf = NULL;
+-	size_t len = 0;
+-
+-	while (getline(&line_buf, &len, cfg) > 0) {
+-		char *buffer = line_buf;
+-		while (isspace(*buffer))
+-			buffer++;
+-		if (buffer[0] == '#')
+-			continue;
+-		int l = strlen(buffer) - 1;
+-		if (l <= 0)
+-			continue;
+-		buffer[l] = 0;
 -		if (buffer[0] == '~')
 -			utmpwatcher_add(fd, &buffer[1]);
-+		if (buffer[0] == '~') {
-+			char *ptr=NULL;
-+			asprintf(&ptr, "%s%s", pwd->pw_dir, &buffer[1]);
-+			watch_list_add(fd, ptr);
-+			free(ptr);
-+		}
- 		else {
- 			watch_list_add(fd, buffer);
- 		}
-@@ -267,9 +285,8 @@
-    homedirs.
- */
+-		else {
+-			watch_list_add(fd, buffer);
+-		}
+-	}
+-	free(line_buf);
+-}
+-
+-/* 
+-   Read config file ignoring Comment lines 
+-   Files specified one per line.  Files with "~" will be expanded to the logged in users
+-   homedirs.
+-*/
++static char *server_watch_file  = "/etc/selinux/restorecond.conf";
++static char *user_watch_file  = "/etc/selinux/restorecond_user.conf";
++static char *watch_file;
  
 -static void read_config(int fd)
-+static void read_config(int fd,	const char *watch_file_path)
- {
+-{
 -	char *watch_file_path = "/etc/selinux/restorecond.conf";
- 
- 	FILE *cfg = NULL;
- 	if (debug_mode)
-@@ -278,8 +295,10 @@
- 	watch_list_free(fd);
- 
- 	cfg = fopen(watch_file_path, "r");
+-
+-	FILE *cfg = NULL;
+-	if (debug_mode)
+-		printf("Read Config\n");
+-
+-	watch_list_free(fd);
+-
+-	cfg = fopen(watch_file_path, "r");
 -	if (!cfg)
 -		exitApp("Error reading config file.");
-+	if (!cfg){
-+		perror(watch_file_path);
-+		exitApp("Error reading config file");
-+	}
- 	process_config(fd, cfg);
- 	fclose(cfg);
+-	process_config(fd, cfg);
+-	fclose(cfg);
+-
+-	inotify_rm_watch(fd, master_wd);
+-	master_wd =
+-	    inotify_add_watch(fd, watch_file_path, IN_MOVED_FROM | IN_MODIFY);
+-	if (master_wd == -1)
+-		exitApp("Error watching config file.");
+-}
++#include <selinux/selinux.h>
  
-@@ -316,21 +335,10 @@
- 			       event->wd, event->mask,
- 			       event->cookie, event->len);
- 		if (event->wd == master_wd)
+-/* 
+-   Inotify watch loop 
+-*/
+-static int watch(int fd)
+-{
+-	char buf[BUF_LEN];
+-	int len, i = 0;
+-	len = read(fd, buf, BUF_LEN);
+-	if (len < 0) {
+-		if (terminate == 0) {
+-			syslog(LOG_ERR, "Read error (%s)", strerror(errno));
+-			return 0;
+-		}
+-		syslog(LOG_ERR, "terminated");
+-		return -1;
+-	} else if (!len)
+-		/* BUF_LEN too small? */
+-		return -1;
+-	while (i < len) {
+-		struct inotify_event *event;
+-		event = (struct inotify_event *)&buf[i];
+-		if (debug_mode)
+-			printf("wd=%d mask=%u cookie=%u len=%u\n",
+-			       event->wd, event->mask,
+-			       event->cookie, event->len);
+-		if (event->wd == master_wd)
 -			read_config(fd);
-+			read_config(fd, watch_file);
- 		else {
+-		else {
 -			switch (utmpwatcher_handle(fd, event->wd)) {
 -			case -1:	/* Message was not for utmpwatcher */
 -				if (event->len)
@@ -204,12 +368,25 @@ diff --exclude-from=exclude --exclude=se
 -			default:	/* No users logged in or out */
 -				break;
 -			}
-+			if (event->len)
-+				watch_list_find(event->wd, event->name);
- 		}
+-		}
++int debug_mode = 0;
++int verbose_mode = 0;
++int terminate = 0;
++int master_wd = -1;
++int run_as_user = 0;
+ 
+-		i += EVENT_SIZE + event->len;
+-	}
+-	return 0;
++static void done(void) {
++	watch_list_free(master_fd);
++	close(master_fd);
++	utmpwatcher_free();
++	matchpathcon_fini();
+ }
  
- 		i += EVENT_SIZE + event->len;
-@@ -374,7 +382,7 @@
+ static const char *pidfile = "/var/run/restorecond.pid";
+@@ -374,7 +117,7 @@
  
  static void usage(char *program)
  {
@@ -218,38 +395,65 @@ diff --exclude-from=exclude --exclude=se
  	exit(0);
  }
  
-@@ -393,7 +401,9 @@
- void watch_list_add(int fd, const char *path)
- {
- 	struct watchList *ptr = NULL;
-+	size_t i = 0;
- 	struct watchList *prev = NULL;
-+	glob_t globbuf;
- 	char *x = strdup(path);
- 	if (!x)
- 		exitApp("Out of Memory");
-@@ -401,7 +411,15 @@
- 	char *file = basename(path);
- 	ptr = firstDir;
+@@ -390,74 +133,13 @@
+    to see if it is one that we are watching.
+ */
  
+-void watch_list_add(int fd, const char *path)
+-{
+-	struct watchList *ptr = NULL;
+-	struct watchList *prev = NULL;
+-	char *x = strdup(path);
+-	if (!x)
+-		exitApp("Out of Memory");
+-	char *dir = dirname(x);
+-	char *file = basename(path);
+-	ptr = firstDir;
+-
 -	restore(path, 1);
-+	globbuf.gl_offs = 1;
-+	if (glob(path, 
-+		 GLOB_TILDE,
-+		 NULL,
-+		 &globbuf) >= 0) {
-+		for (i=0; i < globbuf.gl_pathc; i++) 
-+			restore(globbuf.gl_pathv[i], 1);
-+		globfree(&globbuf);
-+	}
- 
- 	while (ptr != NULL) {
- 		if (strcmp(dir, ptr->dir) == 0) {
-@@ -445,14 +463,8 @@
+-
+-	while (ptr != NULL) {
+-		if (strcmp(dir, ptr->dir) == 0) {
+-			strings_list_add(&ptr->files, file);
+-			free(x);
+-			return;
+-		}
+-		prev = ptr;
+-		ptr = ptr->next;
+-	}
+-	ptr = calloc(1, sizeof(struct watchList));
+-
+-	if (!ptr)
+-		exitApp("Out of Memory");
+-
+-	ptr->wd = inotify_add_watch(fd, dir, IN_CREATE | IN_MOVED_TO);
+-	if (ptr->wd == -1) {
+-		free(ptr);
+-		syslog(LOG_ERR, "Unable to watch (%s) %s\n",
+-		       path, strerror(errno));
+-		return;
+-	}
+-
+-	ptr->dir = strdup(dir);
+-	if (!ptr->dir)
+-		exitApp("Out of Memory");
+-
+-	strings_list_add(&ptr->files, file);
+-	if (prev)
+-		prev->next = ptr;
+-	else
+-		firstDir = ptr;
+-
+-	if (debug_mode)
+-		printf("%d: Dir=%s, File=%s\n", ptr->wd, ptr->dir, file);
+-
+-	free(x);
+-}
+-
+ int main(int argc, char **argv)
  {
  	int opt;
  	struct sigaction sa;
-+	int run_as_user = 0;
  
 -#ifndef DEBUG
 -	/* Make sure we are root */
@@ -258,13 +462,24 @@ diff --exclude-from=exclude --exclude=se
 -		return 1;
 -	}
 -#endif
- 	/* Make sure we are root */
- 	if (is_selinux_enabled() != 1) {
- 		fprintf(stderr, "Daemon requires SELinux be enabled to run.\n");
-@@ -471,11 +483,18 @@
- 	if (master_fd < 0)
- 		exitApp("inotify_init");
+-	/* Make sure we are root */
+-	if (is_selinux_enabled() != 1) {
+-		fprintf(stderr, "Daemon requires SELinux be enabled to run.\n");
+-		return 1;
+-	}
++	/* If we are not running SELinux then just exit */
++	if (is_selinux_enabled() != 1) return 0;
  
+ 	/* Register sighandlers */
+ 	sa.sa_flags = 0;
+@@ -467,15 +149,18 @@
+ 
+ 	set_matchpathcon_flags(MATCHPATHCON_NOTRANS);
+ 
+-	master_fd = inotify_init();
+-	if (master_fd < 0)
+-		exitApp("inotify_init");
+-
 -	while ((opt = getopt(argc, argv, "dv")) > 0) {
 +	atexit( done );
 +	while ((opt = getopt(argc, argv, "uf:dv")) > 0) {
@@ -281,19 +496,25 @@ diff --exclude-from=exclude --exclude=se
  		case 'v':
  			verbose_mode = 1;
  			break;
-@@ -483,7 +502,18 @@
+@@ -483,22 +168,40 @@
  			usage(argv[0]);
  		}
  	}
 -	read_config(master_fd);
 +
-+	if (getuid() != 0) {
-+		watch_file = user_watch_file;
-+		read_config(master_fd, watch_file);
-+		if (run_as_user) 
-+			return server(master_fd);
-+		else 
-+			return start();
++	master_fd = inotify_init();
++	if (master_fd < 0)
++		exitApp("inotify_init");
++
++	uid_t uid = getuid();
++	struct passwd *pwd = getpwuid(uid);
++	homedir = pwd->pw_dir;
++	if (uid != 0) {
++		if (run_as_user)
++			return server(master_fd, user_watch_file);
++		if (start() != 0) 
++			return server(master_fd, user_watch_file);
++		return 0;
 +	}
 +
 +	watch_file = server_watch_file;
@@ -301,7 +522,13 @@ diff --exclude-from=exclude --exclude=se
  
  	if (!debug_mode)
  		daemon(0, 0);
-@@ -496,9 +526,10 @@
+ 
+ 	write_pid_file();
+ 
+-	while (watch(master_fd) == 0) {
++	while (watch(master_fd, watch_file) == 0) {
+ 	};
+ 
  	watch_list_free(master_fd);
  	close(master_fd);
  	matchpathcon_fini();
@@ -325,15 +552,43 @@ diff --exclude-from=exclude --exclude=se
 +/root/.ssh/*
 diff --exclude-from=exclude --exclude=sepolgen-1.0.16 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.desktop policycoreutils-2.0.62/restorecond/restorecond.desktop
 --- nsapolicycoreutils/restorecond/restorecond.desktop	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/restorecond/restorecond.desktop	2009-05-04 13:40:26.000000000 -0400
++++ policycoreutils-2.0.62/restorecond/restorecond.desktop	2009-05-06 14:10:09.000000000 -0400
 @@ -0,0 +1,7 @@
 +[Desktop Entry]
 +Name=File Context maintainer
-+Exec=/usr/sbin/restorecond
++Exec=/usr/sbin/restorecond -u
 +Comment=Fix file context in owned by the user
 +Encoding=UTF-8
 +Type=Application
 +StartupNotify=false
+diff --exclude-from=exclude --exclude=sepolgen-1.0.16 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.h policycoreutils-2.0.62/restorecond/restorecond.h
+--- nsapolicycoreutils/restorecond/restorecond.h	2008-08-28 09:34:24.000000000 -0400
++++ policycoreutils-2.0.62/restorecond/restorecond.h	2009-05-12 15:13:35.000000000 -0400
+@@ -24,7 +24,22 @@
+ #ifndef RESTORED_CONFIG_H
+ #define RESTORED_CONFIG_H
+ 
+-void exitApp(const char *msg);
+-void watch_list_add(int inotify_fd, const char *path);
++extern int debug_mode;
++extern int verbose_mode;
++extern const char *homedir;
++extern int terminate;
++extern int master_wd;
++extern int run_as_user;
++
++extern int start(void);
++extern int server(int, const char *watch_file);
++
++extern void exitApp(const char *msg);
++extern void read_config(int fd,	const char *watch_file);
++
++extern int watch(int fd, const char *watch_file);
++extern void watch_list_add(int inotify_fd, const char *path);
++extern int watch_list_find(int wd, const char *file);
++extern void watch_list_free(int fd);
+ 
+ #endif
 diff --exclude-from=exclude --exclude=sepolgen-1.0.16 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond_user.conf policycoreutils-2.0.62/restorecond/restorecond_user.conf
 --- nsapolicycoreutils/restorecond/restorecond_user.conf	1969-12-31 19:00:00.000000000 -0500
 +++ policycoreutils-2.0.62/restorecond/restorecond_user.conf	2009-05-04 13:40:26.000000000 -0400
@@ -342,8 +597,8 @@ diff --exclude-from=exclude --exclude=se
 +~/public_html/*
 diff --exclude-from=exclude --exclude=sepolgen-1.0.16 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/user.c policycoreutils-2.0.62/restorecond/user.c
 --- nsapolicycoreutils/restorecond/user.c	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.62/restorecond/user.c	2009-05-04 13:40:26.000000000 -0400
-@@ -0,0 +1,223 @@
++++ policycoreutils-2.0.62/restorecond/user.c	2009-05-12 15:15:38.000000000 -0400
+@@ -0,0 +1,220 @@
 +/*
 + * restorecond
 + *
@@ -370,22 +625,6 @@ diff --exclude-from=exclude --exclude=se
 + *
 +*/
 +
-+/* 
-+ * PURPOSE:
-+ * This daemon program watches for the creation of files listed in a config file
-+ * and makes sure that there security context matches the systems defaults
-+ *
-+ * USAGE:
-+ * restorecond [-d] [-v]
-+ * 
-+ * -d   Run in debug mode
-+ * -v   Run in verbose mode (Report missing files)
-+ *
-+ * EXAMPLE USAGE:
-+ * restorecond
-+ *
-+ */
-+
 +#define _GNU_SOURCE
 +#include <sys/inotify.h>
 +#include <errno.h>
@@ -408,10 +647,6 @@ diff --exclude-from=exclude --exclude=se
 +#include <dbus/dbus-glib.h>
 +#include <dbus/dbus-glib-lowlevel.h>
 +
-+extern int watch_list_find(int wd, const char *file);
-+extern void watch_list_free(int fd);
-+extern int debug_mode;
-+
 +static DBusHandlerResult signal_filter (DBusConnection *connection, DBusMessage *message, void *user_data);
 +
 +static const char *PATH="/org/selinux/Restorecond";
@@ -420,6 +655,7 @@ diff --exclude-from=exclude --exclude=se
 +static const char *RULE="type='signal',interface='org.selinux.RestorecondIface'";
 +
 +#include <selinux/selinux.h>
++#include <sys/file.h>
 +
 +/* size of the event structure, not counting name */
 +#define EVENT_SIZE  (sizeof (struct inotify_event))
@@ -514,7 +750,8 @@ diff --exclude-from=exclude --exclude=se
 +	dbus_error_init (&error);
 +	bus = dbus_bus_get (DBUS_BUS_SESSION, &error);
 +	if (!bus) {
-+		g_warning ("Failed to connect to the D-BUS daemon: %s", error.message);
++		if (debug_mode)
++			g_warning ("Failed to connect to the D-BUS daemon: %s", error.message);
 +		dbus_error_free (&error);
 +		return 1;
 +	}
@@ -531,42 +768,407 @@ diff --exclude-from=exclude --exclude=se
 +	return 0;
 +}
 +
-+int server(int master_fd) {
-+  GMainLoop *loop;
-+  DBusConnection *bus;
-+  DBusError error;
-+
-+  loop = g_main_loop_new (NULL, FALSE);
-+
-+  dbus_error_init (&error);
-+   if(getuid() == 0) {
-+	   bus = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
-+   } else { 
-+	   bus = dbus_bus_get (DBUS_BUS_SESSION, &error);
-+   }
-+  if (!bus) {
-+    g_warning ("Failed to connect to the D-BUS daemon: %s", error.message);
-+    dbus_error_free (&error);
-+    return 1;
-+  }
-+  dbus_connection_setup_with_g_main (bus, NULL);
++int server(int master_fd, const char *watch_file) {
++    GMainLoop *loop;
++    DBusConnection *bus;
++    DBusError error;
++
++    loop = g_main_loop_new (NULL, FALSE);
++    
++    dbus_error_init (&error);
++    bus = dbus_bus_get (DBUS_BUS_SESSION, &error);
++    if (bus) {
++	dbus_connection_setup_with_g_main (bus, NULL);
++	
++	/* listening to messages from all objects as no path is specified */
++	dbus_bus_add_match (bus, RULE, &error); // see signals from the given interfacey
++	dbus_connection_add_filter (bus, signal_filter, loop, NULL);
++    } else {
++	// ! dbus, run as local service
++	char *ptr=NULL;
++	asprintf(&ptr, "%s/.restorecond", homedir);
++	int fd = open(ptr, O_CREAT | O_WRONLY | O_NOFOLLOW, S_IRUSR | S_IWUSR);
++	if (debug_mode)
++	    g_warning ("Lock file: %s", ptr);
++
++	free(ptr);
++	if (fd < 0) {
++	    if (debug_mode)
++		perror("open");
++	    return 0;
++	}
++	if (flock(fd, LOCK_EX | LOCK_NB) < 0) {
++	    if (debug_mode)
++		       perror("flock");
++		   return 0;
++	}
++    }
++    
++    read_config(master_fd, watch_file);
++    
++    set_matchpathcon_flags(MATCHPATHCON_NOTRANS);
++    
++    GIOChannel *c = g_io_channel_unix_new(master_fd);
++    
++    g_io_add_watch_full( c,
++			 G_PRIORITY_HIGH,
++			 G_IO_IN|G_IO_ERR|G_IO_HUP,
++			 io_channel_callback, NULL, NULL);
++    
++    g_main_loop_run (loop);
++    return 0;
++}
++
+diff --exclude-from=exclude --exclude=sepolgen-1.0.16 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/watch.c policycoreutils-2.0.62/restorecond/watch.c
+--- nsapolicycoreutils/restorecond/watch.c	1969-12-31 19:00:00.000000000 -0500
++++ policycoreutils-2.0.62/restorecond/watch.c	2009-05-12 15:12:28.000000000 -0400
+@@ -0,0 +1,346 @@
++#define _GNU_SOURCE
++#include <sys/inotify.h>
++#include <errno.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
++#include <ctype.h>
++#include <sys/types.h>
++#include <syslog.h>
++#include <glob.h>
++#include <libgen.h>
++#include <sys/stat.h>
++#include <string.h>
++#include <stdio.h>
++#include <fcntl.h>
++#include <selinux/selinux.h>
++#include "restorecond.h"
++#include "stringslist.h"
++#include "utmpwatcher.h"
++
++/* size of the event structure, not counting name */
++#define EVENT_SIZE  (sizeof (struct inotify_event))
++/* reasonable guess as to size of 1024 events */
++#define BUF_LEN        (1024 * (EVENT_SIZE + 16))
++
++/* Compare two contexts to see if their differences are "significant",
++ * or whether the only difference is in the user. */
++static int only_changed_user(const char *a, const char *b)
++{
++	char *rest_a, *rest_b;	/* Rest of the context after the user */
++	if (!a || !b)
++		return 0;
++	rest_a = strchr(a, ':');
++	rest_b = strchr(b, ':');
++	if (!rest_a || !rest_b)
++		return 0;
++	return (strcmp(rest_a, rest_b) == 0);
++}
++
++
++/* 
++   Set the file context to the default file context for this system.
++   Same as restorecon.
++*/
++static void restore(const char *filename, int exact)
++{
++	int retcontext = 0;
++	security_context_t scontext = NULL;
++	security_context_t prev_context = NULL;
++	struct stat st;
++	int fd = -1;
++	if (debug_mode)
++		printf("restore %s\n", filename);
++
++	fd = open(filename, O_NOFOLLOW | O_RDONLY);
++	if (fd < 0) {
++		if (verbose_mode)
++			syslog(LOG_ERR, "Unable to open file (%s) %s\n",
++			       filename, strerror(errno));
++		return;
++	}
++
++	if (fstat(fd, &st) != 0) {
++		syslog(LOG_ERR, "Unable to stat file (%s) %s\n", filename,
++		       strerror(errno));
++		close(fd);
++		return;
++	}
++
++	if (!(st.st_mode & S_IFDIR) && st.st_nlink > 1) {
++		if (exact) { 
++			syslog(LOG_ERR,
++			       "Will not restore a file with more than one hard link (%s) %s\n",
++			       filename, strerror(errno));
++		}
++		close(fd);
++		return;
++	}
++
++	if (matchpathcon(filename, st.st_mode, &scontext) < 0) {
++		if (errno == ENOENT)
++			return;
++		syslog(LOG_ERR, "matchpathcon(%s) failed %s\n", filename,
++		       strerror(errno));
++		return;
++	}
++	retcontext = fgetfilecon_raw(fd, &prev_context);
++
++	if (retcontext >= 0 || errno == ENODATA) {
++		if (retcontext < 0)
++			prev_context = NULL;
++		if (retcontext < 0 || (strcmp(prev_context, scontext) != 0)) {
++
++			if (only_changed_user(scontext, prev_context) != 0) {
++				free(scontext);
++				free(prev_context);
++				close(fd);
++				return;
++			}
++
++			if (fsetfilecon(fd, scontext) < 0) {
++				if (errno != EOPNOTSUPP) 
++					syslog(LOG_ERR,
++					       "set context %s->%s failed:'%s'\n",
++					       filename, scontext, strerror(errno));
++				if (retcontext >= 0)
++					free(prev_context);
++				free(scontext);
++				close(fd);
++				return;
++			}
++			syslog(LOG_WARNING, "Reset file context %s: %s->%s\n",
++			       filename, prev_context, scontext);
++		}
++		if (retcontext >= 0)
++			free(prev_context);
++	} else {
++		if (errno != EOPNOTSUPP) 
++			syslog(LOG_ERR, "get context on %s failed: '%s'\n",
++			       filename, strerror(errno));
++	}
++	free(scontext);
++	close(fd);
++}
++
++struct watchList {
++	struct watchList *next;
++	int wd;
++	char *dir;
++	struct stringsList *files;
++};
++struct watchList *firstDir = NULL;
++
++void watch_list_add(int fd, const char *path)
++{
++	struct watchList *ptr = NULL;
++	size_t i = 0;
++	struct watchList *prev = NULL;
++	glob_t globbuf;
++	char *x = strdup(path);
++	if (!x)
++		exitApp("Out of Memory");
++	char *dir = dirname(x);
++	char *file = basename(x);
++	ptr = firstDir;
++
++	globbuf.gl_offs = 1;
++	if (glob(path, 
++		 GLOB_TILDE,
++		 NULL,
++		 &globbuf) >= 0) {
++		for (i=0; i < globbuf.gl_pathc; i++) 
++			restore(globbuf.gl_pathv[i], 1);
++		globfree(&globbuf);
++	}
++
++	while (ptr != NULL) {
++		if (strcmp(dir, ptr->dir) == 0) {
++			strings_list_add(&ptr->files, file);
++			free(x);
++			return;
++		}
++		prev = ptr;
++		ptr = ptr->next;
++	}
++	ptr = calloc(1, sizeof(struct watchList));
++
++	if (!ptr)
++		exitApp("Out of Memory");
++
++	ptr->wd = inotify_add_watch(fd, dir, IN_CREATE | IN_MOVED_TO);
++	if (ptr->wd == -1) {
++		free(ptr);
++		syslog(LOG_ERR, "Unable to watch (%s) %s\n",
++		       path, strerror(errno));
++		return;
++	}
++
++	ptr->dir = strdup(dir);
++	if (!ptr->dir)
++		exitApp("Out of Memory");
++
++	strings_list_add(&ptr->files, file);
++	if (prev)
++		prev->next = ptr;
++	else
++		firstDir = ptr;
++
++	if (debug_mode)
++		printf("%d: Dir=%s, File=%s\n", ptr->wd, ptr->dir, file);
++
++	free(x);
++}
++
++/* 
++   A file was in a direcroty has been created. This function checks to 
++   see if it is one that we are watching.
++*/
++
++int watch_list_find(int wd, const char *file)
++{
++	struct watchList *ptr = NULL;
++	ptr = firstDir;
++
++	if (debug_mode)
++		printf("%d: File=%s\n", wd, file);
++	while (ptr != NULL) {
++		if (ptr->wd == wd) {
++			int exact=0;
++			if (strings_list_find(ptr->files, file, &exact) == 0) {
++				char *path = NULL;
++				if (asprintf(&path, "%s/%s", ptr->dir, file) <
++				    0)
++					exitApp("Error allocating memory.");
++				restore(path, exact);
++				free(path);
++				return 0;
++			}
++			if (debug_mode)
++				strings_list_print(ptr->files);
++
++			/* Not found in this directory */
++			return -1;
++		}
++		ptr = ptr->next;
++	}
++	/* Did not find a directory */
++	return -1;
++}
++
++void watch_list_free(int fd)
++{
++	struct watchList *ptr = NULL;
++	struct watchList *prev = NULL;
++	ptr = firstDir;
++
++	while (ptr != NULL) {
++		inotify_rm_watch(fd, ptr->wd);
++		strings_list_free(ptr->files);
++		free(ptr->dir);
++		prev = ptr;
++		ptr = ptr->next;
++		free(prev);
++	}
++	firstDir = NULL;
++}
++
++/* 
++   Inotify watch loop 
++*/
++int watch(int fd, const char *watch_file)
++{
++	char buf[BUF_LEN];
++	int len, i = 0;
++	len = read(fd, buf, BUF_LEN);
++	if (len < 0) {
++		if (terminate == 0) {
++			syslog(LOG_ERR, "Read error (%s)", strerror(errno));
++			return 0;
++		}
++		syslog(LOG_ERR, "terminated");
++		return -1;
++	} else if (!len)
++		/* BUF_LEN too small? */
++		return -1;
++	while (i < len) {
++		struct inotify_event *event;
++		event = (struct inotify_event *)&buf[i];
++		if (debug_mode)
++			printf("wd=%d mask=%u cookie=%u len=%u\n",
++			       event->wd, event->mask,
++			       event->cookie, event->len);
++		if (event->wd == master_wd)
++			read_config(fd, watch_file);
++		else {
++			if (event->len)
++				watch_list_find(event->wd, event->name);
++		}
++
++		i += EVENT_SIZE + event->len;
++	}
++	return 0;
++}
++
++static void process_config(int fd, FILE * cfg)
++{
++	char *line_buf = NULL;
++	size_t len = 0;
 +
-+  /* listening to messages from all objects as no path is specified */
-+  dbus_bus_add_match (bus, RULE, &error); // see signals from the given interfacey
-+  dbus_connection_add_filter (bus, signal_filter, loop, NULL);
-+
-+  set_matchpathcon_flags(MATCHPATHCON_NOTRANS);
-+
-+  GIOChannel *c = g_io_channel_unix_new(master_fd);
-+  
-+  g_io_add_watch_full( c,
-+		       G_PRIORITY_HIGH,
-+		       G_IO_IN|G_IO_ERR|G_IO_HUP,
-+		       io_channel_callback, NULL, NULL);
-+  
-+  g_main_loop_run (loop);
-+  return 0;
++	while (getline(&line_buf, &len, cfg) > 0) {
++		char *buffer = line_buf;
++		while (isspace(*buffer))
++			buffer++;
++		if (buffer[0] == '#')
++			continue;
++		int l = strlen(buffer) - 1;
++		if (l <= 0)
++			continue;
++		buffer[l] = 0;
++		if (buffer[0] == '~') {
++			if (run_as_user) {
++				char *ptr=NULL;
++				asprintf(&ptr, "%s%s", homedir, &buffer[1]);
++				watch_list_add(fd, ptr);
++				free(ptr);
++			} else {
++				utmpwatcher_add(fd, &buffer[1]);
++			}
++		} else {
++			watch_list_add(fd, buffer);
++		}
++	}
++	free(line_buf);
++}
++
++/* 
++   Read config file ignoring Comment lines 
++   Files specified one per line.  Files with "~" will be expanded to the logged in users
++   homedirs.
++*/
++
++void read_config(int fd, const char *watch_file_path)
++{
++
++	FILE *cfg = NULL;
++	if (debug_mode)
++		printf("Read Config\n");
++
++	watch_list_free(fd);
++
++	cfg = fopen(watch_file_path, "r");
++	if (!cfg){
++		perror(watch_file_path);
++		exitApp("Error reading config file");
++	}
++	process_config(fd, cfg);
++	fclose(cfg);
++
++	inotify_rm_watch(fd, master_wd);
++	master_wd =
++	    inotify_add_watch(fd, watch_file_path, IN_MOVED_FROM | IN_MODIFY);
++	if (master_wd == -1)
++		exitApp("Error watching config file.");
 +}
++
 diff --exclude-from=exclude --exclude=sepolgen-1.0.16 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/chcat policycoreutils-2.0.62/scripts/chcat
 --- nsapolicycoreutils/scripts/chcat	2009-01-13 08:45:35.000000000 -0500
 +++ policycoreutils-2.0.62/scripts/chcat	2009-05-04 13:40:26.000000000 -0400
@@ -830,7 +1432,7 @@ diff --exclude-from=exclude --exclude=se
  
 diff --exclude-from=exclude --exclude=sepolgen-1.0.16 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/seobject.py policycoreutils-2.0.62/semanage/seobject.py
 --- nsapolicycoreutils/semanage/seobject.py	2008-11-14 17:10:15.000000000 -0500
-+++ policycoreutils-2.0.62/semanage/seobject.py	2009-05-05 14:45:58.000000000 -0400
++++ policycoreutils-2.0.62/semanage/seobject.py	2009-05-05 16:49:09.000000000 -0400
 @@ -1,5 +1,5 @@
  #! /usr/bin/python -E
 -# Copyright (C) 2005, 2006, 2007, 2008 Red Hat 




More information about the scm-commits mailing list