* Tue Mar 23 2010 Dan Walsh <dwalsh@redhat.com> 2.0.82-1

- Update to upstream
	* Add avc's since boot from Dan Walsh.
	* Fix unit tests from Dan Walsh.
This commit is contained in:
Daniel J Walsh 2010-03-24 20:14:14 +00:00
parent 54e7bdbbaa
commit cf47f6f7a3
7 changed files with 5666 additions and 6304 deletions

View File

@ -217,3 +217,6 @@ policycoreutils-2.0.79.tgz
policycoreutils-2.0.80.tgz policycoreutils-2.0.80.tgz
policycoreutils-2.0.81.tgz policycoreutils-2.0.81.tgz
sepolgen-1.0.20.tgz sepolgen-1.0.20.tgz
sepolgen-1.0.22.tgz
policycoreutils-2.0.82.tgz
sepolgen-1.0.23.tgz

View File

@ -1,6 +1,6 @@
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/booleansPage.py policycoreutils-2.0.78/gui/booleansPage.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/booleansPage.py policycoreutils-2.0.81/gui/booleansPage.py
--- nsapolicycoreutils/gui/booleansPage.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/booleansPage.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/booleansPage.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/booleansPage.py 2010-03-12 10:04:14.000000000 -0500
@@ -0,0 +1,247 @@ @@ -0,0 +1,247 @@
+# +#
+# booleansPage.py - GUI for Booleans page in system-config-securitylevel +# booleansPage.py - GUI for Booleans page in system-config-securitylevel
@ -249,9 +249,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/booleansPage.py poli
+ self.load(self.filter) + self.load(self.filter)
+ return True + return True
+ +
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/domainsPage.py policycoreutils-2.0.78/gui/domainsPage.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/domainsPage.py policycoreutils-2.0.81/gui/domainsPage.py
--- nsapolicycoreutils/gui/domainsPage.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/domainsPage.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/domainsPage.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/domainsPage.py 2010-03-12 10:04:14.000000000 -0500
@@ -0,0 +1,154 @@ @@ -0,0 +1,154 @@
+## domainsPage.py - show selinux domains +## domainsPage.py - show selinux domains
+## Copyright (C) 2009 Red Hat, Inc. +## Copyright (C) 2009 Red Hat, Inc.
@ -407,9 +407,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/domainsPage.py polic
+ +
+ except ValueError, e: + except ValueError, e:
+ self.error(e.args[0]) + self.error(e.args[0])
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/fcontextPage.py policycoreutils-2.0.78/gui/fcontextPage.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/fcontextPage.py policycoreutils-2.0.81/gui/fcontextPage.py
--- nsapolicycoreutils/gui/fcontextPage.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/fcontextPage.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/fcontextPage.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/fcontextPage.py 2010-03-12 10:04:14.000000000 -0500
@@ -0,0 +1,223 @@ @@ -0,0 +1,223 @@
+## fcontextPage.py - show selinux mappings +## fcontextPage.py - show selinux mappings
+## Copyright (C) 2006 Red Hat, Inc. +## Copyright (C) 2006 Red Hat, Inc.
@ -634,9 +634,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/fcontextPage.py poli
+ self.store.set_value(iter, SPEC_COL, fspec) + self.store.set_value(iter, SPEC_COL, fspec)
+ self.store.set_value(iter, FTYPE_COL, ftype) + self.store.set_value(iter, FTYPE_COL, ftype)
+ self.store.set_value(iter, TYPE_COL, "%s:%s" % (type, mls)) + 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.78/gui/html_util.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/html_util.py policycoreutils-2.0.81/gui/html_util.py
--- nsapolicycoreutils/gui/html_util.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/html_util.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/html_util.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/html_util.py 2010-03-12 10:04:14.000000000 -0500
@@ -0,0 +1,164 @@ @@ -0,0 +1,164 @@
+# Authors: John Dennis <jdennis@redhat.com> +# Authors: John Dennis <jdennis@redhat.com>
+# +#
@ -802,9 +802,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/html_util.py policyc
+ doc += tail + doc += tail
+ return doc + return doc
+ +
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/lockdown.glade policycoreutils-2.0.78/gui/lockdown.glade diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/lockdown.glade policycoreutils-2.0.81/gui/lockdown.glade
--- nsapolicycoreutils/gui/lockdown.glade 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/lockdown.glade 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/lockdown.glade 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/lockdown.glade 2010-03-12 10:04:14.000000000 -0500
@@ -0,0 +1,771 @@ @@ -0,0 +1,771 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
@ -1577,9 +1577,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/lockdown.glade polic
+</widget> +</widget>
+ +
+</glade-interface> +</glade-interface>
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/lockdown.gladep policycoreutils-2.0.78/gui/lockdown.gladep diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/lockdown.gladep policycoreutils-2.0.81/gui/lockdown.gladep
--- nsapolicycoreutils/gui/lockdown.gladep 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/lockdown.gladep 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/lockdown.gladep 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/lockdown.gladep 2010-03-12 10:04:14.000000000 -0500
@@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd"> +<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
@ -1588,9 +1588,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/lockdown.gladep poli
+ <name></name> + <name></name>
+ <program_name></program_name> + <program_name></program_name>
+</glade-project> +</glade-project>
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/lockdown.py policycoreutils-2.0.78/gui/lockdown.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/lockdown.py policycoreutils-2.0.81/gui/lockdown.py
--- nsapolicycoreutils/gui/lockdown.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/lockdown.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/lockdown.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/lockdown.py 2010-03-12 10:04:14.000000000 -0500
@@ -0,0 +1,382 @@ @@ -0,0 +1,382 @@
+#!/usr/bin/python +#!/usr/bin/python
+# +#
@ -1974,9 +1974,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/lockdown.py policyco
+ +
+ app = booleanWindow() + app = booleanWindow()
+ app.stand_alone() + app.stand_alone()
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/loginsPage.py policycoreutils-2.0.78/gui/loginsPage.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/loginsPage.py policycoreutils-2.0.81/gui/loginsPage.py
--- nsapolicycoreutils/gui/loginsPage.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/loginsPage.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/loginsPage.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/loginsPage.py 2010-03-12 10:04:14.000000000 -0500
@@ -0,0 +1,185 @@ @@ -0,0 +1,185 @@
+## loginsPage.py - show selinux mappings +## loginsPage.py - show selinux mappings
+## Copyright (C) 2006 Red Hat, Inc. +## Copyright (C) 2006 Red Hat, Inc.
@ -2163,9 +2163,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/loginsPage.py policy
+ self.store.set_value(iter, 1, seuser) + self.store.set_value(iter, 1, seuser)
+ self.store.set_value(iter, 2, seobject.translate(serange)) + self.store.set_value(iter, 2, seobject.translate(serange))
+ +
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/Makefile policycoreutils-2.0.78/gui/Makefile diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/Makefile policycoreutils-2.0.81/gui/Makefile
--- nsapolicycoreutils/gui/Makefile 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/Makefile 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/Makefile 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/Makefile 2010-03-12 10:04:14.000000000 -0500
@@ -0,0 +1,40 @@ @@ -0,0 +1,40 @@
+# Installation directories. +# Installation directories.
+PREFIX ?= ${DESTDIR}/usr +PREFIX ?= ${DESTDIR}/usr
@ -2207,9 +2207,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/Makefile policycoreu
+indent: +indent:
+ +
+relabel: +relabel:
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/mappingsPage.py policycoreutils-2.0.78/gui/mappingsPage.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/mappingsPage.py policycoreutils-2.0.81/gui/mappingsPage.py
--- nsapolicycoreutils/gui/mappingsPage.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/mappingsPage.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/mappingsPage.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/mappingsPage.py 2010-03-12 10:04:14.000000000 -0500
@@ -0,0 +1,56 @@ @@ -0,0 +1,56 @@
+## mappingsPage.py - show selinux mappings +## mappingsPage.py - show selinux mappings
+## Copyright (C) 2006 Red Hat, Inc. +## Copyright (C) 2006 Red Hat, Inc.
@ -2267,9 +2267,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/mappingsPage.py poli
+ for k in keys: + for k in keys:
+ print "%-25s %-25s %-25s" % (k, dict[k][0], translate(dict[k][1])) + print "%-25s %-25s %-25s" % (k, dict[k][0], translate(dict[k][1]))
+ +
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/modulesPage.py policycoreutils-2.0.78/gui/modulesPage.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/modulesPage.py policycoreutils-2.0.81/gui/modulesPage.py
--- nsapolicycoreutils/gui/modulesPage.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/modulesPage.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/modulesPage.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/modulesPage.py 2010-03-12 10:04:14.000000000 -0500
@@ -0,0 +1,190 @@ @@ -0,0 +1,190 @@
+## modulesPage.py - show selinux mappings +## modulesPage.py - show selinux mappings
+## Copyright (C) 2006-2009 Red Hat, Inc. +## Copyright (C) 2006-2009 Red Hat, Inc.
@ -2461,9 +2461,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/modulesPage.py polic
+ +
+ except ValueError, e: + except ValueError, e:
+ self.error(e.args[0]) + self.error(e.args[0])
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.glade policycoreutils-2.0.78/gui/polgen.glade diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.glade policycoreutils-2.0.81/gui/polgen.glade
--- nsapolicycoreutils/gui/polgen.glade 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/polgen.glade 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/polgen.glade 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/polgen.glade 2010-03-12 10:04:14.000000000 -0500
@@ -0,0 +1,3305 @@ @@ -0,0 +1,3305 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
@ -5770,9 +5770,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.glade policyc
+</widget> +</widget>
+ +
+</glade-interface> +</glade-interface>
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.gladep policycoreutils-2.0.78/gui/polgen.gladep diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.gladep policycoreutils-2.0.81/gui/polgen.gladep
--- nsapolicycoreutils/gui/polgen.gladep 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/polgen.gladep 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/polgen.gladep 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/polgen.gladep 2010-03-12 10:04:14.000000000 -0500
@@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd"> +<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
@ -5781,9 +5781,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.gladep policy
+ <name></name> + <name></name>
+ <program_name></program_name> + <program_name></program_name>
+</glade-project> +</glade-project>
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgengui.py policycoreutils-2.0.78/gui/polgengui.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgengui.py policycoreutils-2.0.81/gui/polgengui.py
--- nsapolicycoreutils/gui/polgengui.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/polgengui.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/polgengui.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/polgengui.py 2010-03-12 10:04:14.000000000 -0500
@@ -0,0 +1,627 @@ @@ -0,0 +1,627 @@
+#!/usr/bin/python -E +#!/usr/bin/python -E
+# +#
@ -6412,10 +6412,10 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgengui.py policyc
+ +
+ app = childWindow() + app = childWindow()
+ app.stand_alone() + app.stand_alone()
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.py policycoreutils-2.0.78/gui/polgen.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.py policycoreutils-2.0.81/gui/polgen.py
--- nsapolicycoreutils/gui/polgen.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/polgen.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/polgen.py 2010-02-03 11:46:45.000000000 -0500 +++ policycoreutils-2.0.81/gui/polgen.py 2010-03-24 08:01:12.000000000 -0400
@@ -0,0 +1,1213 @@ @@ -0,0 +1,1226 @@
+#!/usr/bin/python +#!/usr/bin/python
+# +#
+# Copyright (C) 2007, 2008, 2009 Red Hat +# Copyright (C) 2007, 2008, 2009 Red Hat
@ -6692,13 +6692,15 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.py policycore
+ self.symbols["setfcap"] = "add_capability('setfcap')" + self.symbols["setfcap"] = "add_capability('setfcap')"
+ +
+ self.DEFAULT_DIRS = {} + self.DEFAULT_DIRS = {}
+ self.DEFAULT_DIRS["rw"] = ["rw", [], rw];
+ self.DEFAULT_DIRS["tmp"] = ["tmp", [], tmp];
+ self.DEFAULT_DIRS["/etc"] = ["etc_rw", [], etc_rw]; + self.DEFAULT_DIRS["/etc"] = ["etc_rw", [], etc_rw];
+ self.DEFAULT_DIRS["/var/spool"] = ["var_spool", [], var_spool]; + self.DEFAULT_DIRS["/tmp"] = ["tmp", [], tmp];
+ self.DEFAULT_DIRS["rw"] = ["rw", [], rw];
+ self.DEFAULT_DIRS["/var/lib"] = ["var_lib", [], var_lib]; + self.DEFAULT_DIRS["/var/lib"] = ["var_lib", [], var_lib];
+ self.DEFAULT_DIRS["/var/log"] = ["var_log", [], var_log]; + self.DEFAULT_DIRS["/var/log"] = ["var_log", [], var_log];
+ self.DEFAULT_DIRS["/var/run"] = ["var_run", [], var_run]; + self.DEFAULT_DIRS["/var/run"] = ["var_run", [], var_run];
+ self.DEFAULT_DIRS["/var/spool"] = ["var_spool", [], var_spool];
+
+ self.DEFAULT_KEYS=["/etc", "/var/log", "/tmp", "rw", "/var/lib", "/var/run", "/var/spool"]
+ +
+ self.DEFAULT_TYPES = (\ + self.DEFAULT_TYPES = (\
+( self.generate_daemon_types, self.generate_daemon_rules), \ +( self.generate_daemon_types, self.generate_daemon_rules), \
@ -6863,9 +6865,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.py policycore
+ raise ValueError(_("USER Types automatically get a tmp type")) + raise ValueError(_("USER Types automatically get a tmp type"))
+ +
+ if val: + if val:
+ self.DEFAULT_DIRS["tmp"][1].append("/tmp"); + self.DEFAULT_DIRS["/tmp"][1].append("/tmp");
+ else: + else:
+ self.DEFAULT_DIRS["tmp"][1]=[] + self.DEFAULT_DIRS["/tmp"][1]=[]
+ +
+ def set_use_uid(self, val): + def set_use_uid(self, val):
+ self.use_uid = val == True + self.use_uid = val == True
@ -6985,10 +6987,12 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.py policycore
+ return self.DEFAULT_DIRS["rw"] + return self.DEFAULT_DIRS["rw"]
+ +
+ def add_capability(self, capability): + def add_capability(self, capability):
+ self.capabilities.append(capability) + if capability not in self.capabilities:
+ self.capabilities.append(capability)
+ +
+ def add_process(self, process): + def add_process(self, process):
+ self.processes.append(process) + if process not in self.processes:
+ self.processes.append(process)
+ +
+ def add_boolean(self, name, description): + def add_boolean(self, name, description):
+ self.booleans[name] = description + self.booleans[name] = description
@ -7109,14 +7113,20 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.py policycore
+ +
+ def generate_admin_if(self): + def generate_admin_if(self):
+ newif = "" + newif = ""
+ newtypes = ""
+ if self.initscript != "": + if self.initscript != "":
+ newtypes += re.sub("TEMPLATETYPE", self.name, executable.if_initscript_admin_types)
+ newif += re.sub("TEMPLATETYPE", self.name, executable.if_initscript_admin) + newif += re.sub("TEMPLATETYPE", self.name, executable.if_initscript_admin)
+ for d in self.DEFAULT_DIRS: + for d in self.DEFAULT_KEYS:
+ if len(self.DEFAULT_DIRS[d][1]) > 0: + if len(self.DEFAULT_DIRS[d][1]) > 0:
+ newtypes += re.sub("TEMPLATETYPE", self.name, self.DEFAULT_DIRS[d][2].if_admin_types)
+ newif += re.sub("TEMPLATETYPE", self.name, self.DEFAULT_DIRS[d][2].if_admin_rules) + newif += re.sub("TEMPLATETYPE", self.name, self.DEFAULT_DIRS[d][2].if_admin_rules)
+ +
+ if newif != "": + if newif != "":
+ ret = re.sub("TEMPLATETYPE", self.name, executable.if_begin_admin) + ret = re.sub("TEMPLATETYPE", self.name, executable.if_begin_admin)
+ ret += newtypes
+
+ ret += re.sub("TEMPLATETYPE", self.name, executable.if_middle_admin)
+ ret += newif + ret += newif
+ ret += re.sub("TEMPLATETYPE", self.name, executable.if_end_admin) + ret += re.sub("TEMPLATETYPE", self.name, executable.if_end_admin)
+ return ret + return ret
@ -7182,7 +7192,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.py policycore
+ return re.sub("TEMPLATETYPE", self.name, executable.te_cgi_types) + return re.sub("TEMPLATETYPE", self.name, executable.te_cgi_types)
+ +
+ def generate_daemon_rules(self): + def generate_daemon_rules(self):
+ newif = re.sub("TEMPLATETYPE", self.name, executable.te_daemon_rules) + newif = re.sub("TEMPLATETYPE", self.name, executable.te_begin_daemon_rules)
+ +
+ return newif + return newif
+ +
@ -7233,7 +7243,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.py policycore
+ if self.initscript != "": + if self.initscript != "":
+ newif += re.sub("TEMPLATETYPE", self.name, executable.if_initscript_rules) + newif += re.sub("TEMPLATETYPE", self.name, executable.if_initscript_rules)
+ +
+ for d in self.DEFAULT_DIRS: + for d in self.DEFAULT_KEYS:
+ if len(self.DEFAULT_DIRS[d][1]) > 0: + if len(self.DEFAULT_DIRS[d][1]) > 0:
+ newif += re.sub("TEMPLATETYPE", self.name, self.DEFAULT_DIRS[d][2].if_rules) + newif += re.sub("TEMPLATETYPE", self.name, self.DEFAULT_DIRS[d][2].if_rules)
+ for i in self.DEFAULT_DIRS[d][1]: + for i in self.DEFAULT_DIRS[d][1]:
@ -7265,7 +7275,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.py policycore
+ +
+ def generate_te(self): + def generate_te(self):
+ newte = self.generate_default_types() + newte = self.generate_default_types()
+ for d in self.DEFAULT_DIRS: + for d in self.DEFAULT_KEYS:
+ if len(self.DEFAULT_DIRS[d][1]) > 0: + if len(self.DEFAULT_DIRS[d][1]) > 0:
+ # CGI scripts already have a rw_t + # CGI scripts already have a rw_t
+ if self.type != CGI or d != "rw": + if self.type != CGI or d != "rw":
@ -7286,7 +7296,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.py policycore
+ newte += self.generate_default_rules() + newte += self.generate_default_rules()
+ newte += self.generate_boolean_rules() + newte += self.generate_boolean_rules()
+ +
+ for d in self.DEFAULT_DIRS: + for d in self.DEFAULT_KEYS:
+ if len(self.DEFAULT_DIRS[d][1]) > 0: + if len(self.DEFAULT_DIRS[d][1]) > 0:
+ newte += re.sub("TEMPLATETYPE", self.name, self.DEFAULT_DIRS[d][2].te_rules) + newte += re.sub("TEMPLATETYPE", self.name, self.DEFAULT_DIRS[d][2].te_rules)
+ for i in self.DEFAULT_DIRS[d][1]: + for i in self.DEFAULT_DIRS[d][1]:
@ -7312,15 +7322,16 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.py policycore
+ +
+ def generate_fc(self): + def generate_fc(self):
+ newfc = "" + newfc = ""
+ fclist = []
+ if self.program == "": + if self.program == "":
+ raise ValueError(_("You must enter the executable path for your confined process")) + raise ValueError(_("You must enter the executable path for your confined process"))
+ +
+ t1 = re.sub("EXECUTABLE", self.program, executable.fc_program) + t1 = re.sub("EXECUTABLE", self.program, executable.fc_program)
+ newfc += re.sub("TEMPLATETYPE", self.name, t1) + fclist.append(re.sub("TEMPLATETYPE", self.name, t1))
+ +
+ if self.initscript != "": + if self.initscript != "":
+ t1 = re.sub("EXECUTABLE", self.initscript, executable.fc_initscript) + t1 = re.sub("EXECUTABLE", self.initscript, executable.fc_initscript)
+ newfc += re.sub("TEMPLATETYPE", self.name, t1) + fclist.append(re.sub("TEMPLATETYPE", self.name, t1))
+ +
+ for i in self.files.keys(): + for i in self.files.keys():
+ if os.path.exists(i) and stat.S_ISSOCK(os.stat(i)[stat.ST_MODE]): + if os.path.exists(i) and stat.S_ISSOCK(os.stat(i)[stat.ST_MODE]):
@ -7328,13 +7339,15 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.py policycore
+ else: + else:
+ t1 = re.sub("TEMPLATETYPE", self.name, self.files[i][2].fc_file) + t1 = re.sub("TEMPLATETYPE", self.name, self.files[i][2].fc_file)
+ t2 = re.sub("FILENAME", i, t1) + t2 = re.sub("FILENAME", i, t1)
+ newfc += re.sub("FILETYPE", self.files[i][0], t2) + fclist.append(re.sub("FILETYPE", self.files[i][0], t2))
+ +
+ for i in self.dirs.keys(): + for i in self.dirs.keys():
+ t1 = re.sub("TEMPLATETYPE", self.name, self.dirs[i][2].fc_dir) + t1 = re.sub("TEMPLATETYPE", self.name, self.dirs[i][2].fc_dir)
+ t2 = re.sub("FILENAME", i, t1) + t2 = re.sub("FILENAME", i, t1)
+ newfc += re.sub("FILETYPE", self.dirs[i][0], t2) + fclist.append(re.sub("FILETYPE", self.dirs[i][0], t2))
+ +
+ fclist.sort()
+ newfc="\n".join(fclist)
+ return newfc + return newfc
+ +
+ def generate_user_sh(self): + def generate_user_sh(self):
@ -7629,9 +7642,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.py policycore
+ +
+ print mypolicy.generate() + print mypolicy.generate()
+ sys.exit(0) + sys.exit(0)
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/portsPage.py policycoreutils-2.0.78/gui/portsPage.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/portsPage.py policycoreutils-2.0.81/gui/portsPage.py
--- nsapolicycoreutils/gui/portsPage.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/portsPage.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/portsPage.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/portsPage.py 2010-03-12 10:04:14.000000000 -0500
@@ -0,0 +1,259 @@ @@ -0,0 +1,259 @@
+## portsPage.py - show selinux mappings +## portsPage.py - show selinux mappings
+## Copyright (C) 2006 Red Hat, Inc. +## Copyright (C) 2006 Red Hat, Inc.
@ -7892,9 +7905,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/portsPage.py policyc
+ +
+ return True + return True
+ +
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/selinux.tbl policycoreutils-2.0.78/gui/selinux.tbl diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/selinux.tbl policycoreutils-2.0.81/gui/selinux.tbl
--- nsapolicycoreutils/gui/selinux.tbl 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/selinux.tbl 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/selinux.tbl 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/selinux.tbl 2010-03-12 10:04:14.000000000 -0500
@@ -0,0 +1,234 @@ @@ -0,0 +1,234 @@
+acct_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for acct daemon") +acct_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for acct daemon")
+allow_daemons_dump_core _("Admin") _("Allow all daemons to write corefiles to /") +allow_daemons_dump_core _("Admin") _("Allow all daemons to write corefiles to /")
@ -8130,9 +8143,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/selinux.tbl policyco
+webadm_manage_user_files _("HTTPD Service") _("Allow SELinux webadm user to manage unprivileged users home directories") +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") +webadm_read_user_files _("HTTPD Service") _("Allow SELinux webadm user to read unprivileged users home directories")
+ +
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/semanagePage.py policycoreutils-2.0.78/gui/semanagePage.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/semanagePage.py policycoreutils-2.0.81/gui/semanagePage.py
--- nsapolicycoreutils/gui/semanagePage.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/semanagePage.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/semanagePage.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/semanagePage.py 2010-03-12 10:04:14.000000000 -0500
@@ -0,0 +1,168 @@ @@ -0,0 +1,168 @@
+## semanagePage.py - show selinux mappings +## semanagePage.py - show selinux mappings
+## Copyright (C) 2006 Red Hat, Inc. +## Copyright (C) 2006 Red Hat, Inc.
@ -8302,9 +8315,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/semanagePage.py poli
+ self.load(self.filter) + self.load(self.filter)
+ return True + return True
+ +
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/statusPage.py policycoreutils-2.0.78/gui/statusPage.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/statusPage.py policycoreutils-2.0.81/gui/statusPage.py
--- nsapolicycoreutils/gui/statusPage.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/statusPage.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/statusPage.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/statusPage.py 2010-03-12 10:04:14.000000000 -0500
@@ -0,0 +1,190 @@ @@ -0,0 +1,190 @@
+# statusPage.py - show selinux status +# statusPage.py - show selinux status
+## Copyright (C) 2006-2009 Red Hat, Inc. +## Copyright (C) 2006-2009 Red Hat, Inc.
@ -8496,9 +8509,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/statusPage.py policy
+ return self.types[self.selinuxTypeOptionMenu.get_active()] + return self.types[self.selinuxTypeOptionMenu.get_active()]
+ +
+ +
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinux.glade policycoreutils-2.0.78/gui/system-config-selinux.glade diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinux.glade policycoreutils-2.0.81/gui/system-config-selinux.glade
--- nsapolicycoreutils/gui/system-config-selinux.glade 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/system-config-selinux.glade 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/system-config-selinux.glade 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/system-config-selinux.glade 2010-03-12 10:04:14.000000000 -0500
@@ -0,0 +1,3024 @@ @@ -0,0 +1,3024 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
@ -11524,9 +11537,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinu
+</widget> +</widget>
+ +
+</glade-interface> +</glade-interface>
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinux.gladep policycoreutils-2.0.78/gui/system-config-selinux.gladep diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinux.gladep policycoreutils-2.0.81/gui/system-config-selinux.gladep
--- nsapolicycoreutils/gui/system-config-selinux.gladep 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/system-config-selinux.gladep 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/system-config-selinux.gladep 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/system-config-selinux.gladep 2010-03-12 10:04:14.000000000 -0500
@@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd"> +<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
@ -11535,9 +11548,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinu
+ <name></name> + <name></name>
+ <program_name></program_name> + <program_name></program_name>
+</glade-project> +</glade-project>
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinux.py policycoreutils-2.0.78/gui/system-config-selinux.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinux.py policycoreutils-2.0.81/gui/system-config-selinux.py
--- nsapolicycoreutils/gui/system-config-selinux.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/system-config-selinux.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/system-config-selinux.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/system-config-selinux.py 2010-03-12 10:04:14.000000000 -0500
@@ -0,0 +1,187 @@ @@ -0,0 +1,187 @@
+#!/usr/bin/python +#!/usr/bin/python
+# +#
@ -11726,9 +11739,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinu
+ +
+ app = childWindow() + app = childWindow()
+ app.stand_alone() + app.stand_alone()
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/boolean.py policycoreutils-2.0.78/gui/templates/boolean.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/boolean.py policycoreutils-2.0.81/gui/templates/boolean.py
--- nsapolicycoreutils/gui/templates/boolean.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/templates/boolean.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/templates/boolean.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/templates/boolean.py 2010-03-24 08:01:45.000000000 -0400
@@ -0,0 +1,40 @@ @@ -0,0 +1,40 @@
+# Copyright (C) 2007 Red Hat +# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information +# see file 'COPYING' for use and warranty information
@ -11770,10 +11783,10 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/boolean.py
+') +')
+""" +"""
+ +
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/etc_rw.py policycoreutils-2.0.78/gui/templates/etc_rw.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/etc_rw.py policycoreutils-2.0.81/gui/templates/etc_rw.py
--- nsapolicycoreutils/gui/templates/etc_rw.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/templates/etc_rw.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/templates/etc_rw.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/templates/etc_rw.py 2010-03-24 08:01:45.000000000 -0400
@@ -0,0 +1,129 @@ @@ -0,0 +1,113 @@
+# Copyright (C) 2007 Red Hat +# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information +# see file 'COPYING' for use and warranty information
+# +#
@ -11869,30 +11882,14 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/etc_rw.py
+ files_search_etc($1) + files_search_etc($1)
+') +')
+ +
+########################################
+## <summary>
+## Manage TEMPLATETYPE etc_rw files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_manage_conf',`
+ gen_require(`
+ type TEMPLATETYPE_etc_rw_t;
+ ')
+
+ manage_dirs_pattern($1, TEMPLATETYPE_etc_rw_t, TEMPLATETYPE_etc_rw_t)
+ manage_files_pattern($1, TEMPLATETYPE_etc_rw_t, TEMPLATETYPE_etc_rw_t)
+ manage_lnk_files_pattern($1, TEMPLATETYPE_etc_rw_t, TEMPLATETYPE_etc_rw_t)
+')
+
+""" +"""
+ +
+if_admin_types="""
+ type TEMPLATETYPE_etc_rw_t;"""
+
+if_admin_rules=""" +if_admin_rules="""
+ TEMPLATETYPE_manage_conf($1) + files_search_etc($1)
+ admin_pattern($1, TEMPLATETYPE_etc_rw_t)
+""" +"""
+ +
+########################### File Context ################################## +########################### File Context ##################################
@ -11901,12 +11898,12 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/etc_rw.py
+""" +"""
+ +
+fc_dir="""\ +fc_dir="""\
+FILENAME(/.*)? gen_context(system_u:object_r:TEMPLATETYPE_etc_rw_t,s0) +FILENAME(/.*)? gen_context(system_u:object_r:TEMPLATETYPE_etc_rw_t,s0)
+""" +"""
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/executable.py policycoreutils-2.0.78/gui/templates/executable.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/executable.py policycoreutils-2.0.81/gui/templates/executable.py
--- nsapolicycoreutils/gui/templates/executable.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/templates/executable.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/templates/executable.py 2010-01-28 12:17:43.000000000 -0500 +++ policycoreutils-2.0.81/gui/templates/executable.py 2010-03-24 08:01:45.000000000 -0400
@@ -0,0 +1,363 @@ @@ -0,0 +1,360 @@
+# Copyright (C) 2007-2009 Red Hat +# Copyright (C) 2007-2009 Red Hat
+# see file 'COPYING' for use and warranty information +# see file 'COPYING' for use and warranty information
+# +#
@ -12009,13 +12006,11 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/executable
+""" +"""
+ +
+te_daemon_rules=""" +te_daemon_rules="""
+# Init script handling
+domain_use_interactive_fds(TEMPLATETYPE_t)
+
+# internal communication is often done using fifo and unix sockets.
+allow TEMPLATETYPE_t self:fifo_file rw_fifo_file_perms; +allow TEMPLATETYPE_t self:fifo_file rw_fifo_file_perms;
+allow TEMPLATETYPE_t self:unix_stream_socket create_stream_socket_perms; +allow TEMPLATETYPE_t self:unix_stream_socket create_stream_socket_perms;
+ +
+domain_use_interactive_fds(TEMPLATETYPE_t)
+
+files_read_etc_files(TEMPLATETYPE_t) +files_read_etc_files(TEMPLATETYPE_t)
+ +
+miscfiles_read_localization(TEMPLATETYPE_t) +miscfiles_read_localization(TEMPLATETYPE_t)
@ -12236,20 +12231,19 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/executable
+# +#
+interface(`TEMPLATETYPE_admin',` +interface(`TEMPLATETYPE_admin',`
+ gen_require(` + gen_require(`
+ type TEMPLATETYPE_t; + type TEMPLATETYPE_t;"""
+
+if_middle_admin="""
+ ') + ')
+ +
+ allow $1 TEMPLATETYPE_t:process { ptrace signal_perms getattr }; + allow $1 TEMPLATETYPE_t:process { ptrace signal_perms };
+ read_files_pattern($1, TEMPLATETYPE_t, TEMPLATETYPE_t) + ps_process_pattern($1, TEMPLATETYPE_t)
+
+""" +"""
+ +
+if_initscript_admin=""" +if_initscript_admin_types="""
+ gen_require(` + type TEMPLATETYPE_initrc_exec_t;"""
+ type TEMPLATETYPE_initrc_exec_t;
+ ')
+ +
+ # Allow TEMPLATETYPE_t to restart the apache service +if_initscript_admin="""
+ TEMPLATETYPE_initrc_domtrans($1) + TEMPLATETYPE_initrc_domtrans($1)
+ domain_system_change_exemption($1) + domain_system_change_exemption($1)
+ role_transition $2 TEMPLATETYPE_initrc_exec_t system_r; + role_transition $2 TEMPLATETYPE_initrc_exec_t system_r;
@ -12263,16 +12257,16 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/executable
+########################### File Context ################################## +########################### File Context ##################################
+fc_program="""\ +fc_program="""\
+ +
+EXECUTABLE -- gen_context(system_u:object_r:TEMPLATETYPE_exec_t,s0) +EXECUTABLE -- gen_context(system_u:object_r:TEMPLATETYPE_exec_t,s0)
+""" +"""
+fc_initscript="""\ +fc_initscript="""\
+ +
+EXECUTABLE -- gen_context(system_u:object_r:TEMPLATETYPE_initrc_exec_t,s0) +EXECUTABLE -- gen_context(system_u:object_r:TEMPLATETYPE_initrc_exec_t,s0)
+""" +"""
+ +
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/__init__.py policycoreutils-2.0.78/gui/templates/__init__.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/__init__.py policycoreutils-2.0.81/gui/templates/__init__.py
--- nsapolicycoreutils/gui/templates/__init__.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/templates/__init__.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/templates/__init__.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/templates/__init__.py 2010-03-24 08:01:45.000000000 -0400
@@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
+# +#
+# Copyright (C) 2007 Red Hat, Inc. +# Copyright (C) 2007 Red Hat, Inc.
@ -12292,9 +12286,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/__init__.p
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# +#
+ +
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/network.py policycoreutils-2.0.78/gui/templates/network.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/network.py policycoreutils-2.0.81/gui/templates/network.py
--- nsapolicycoreutils/gui/templates/network.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/templates/network.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/templates/network.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/templates/network.py 2010-03-24 08:01:45.000000000 -0400
@@ -0,0 +1,80 @@ @@ -0,0 +1,80 @@
+te_port_types=""" +te_port_types="""
+type TEMPLATETYPE_port_t; +type TEMPLATETYPE_port_t;
@ -12376,10 +12370,10 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/network.py
+corenet_udp_bind_all_unreserved_ports(TEMPLATETYPE_t) +corenet_udp_bind_all_unreserved_ports(TEMPLATETYPE_t)
+""" +"""
+ +
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/rw.py policycoreutils-2.0.78/gui/templates/rw.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/rw.py policycoreutils-2.0.81/gui/templates/rw.py
--- nsapolicycoreutils/gui/templates/rw.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/templates/rw.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/templates/rw.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/templates/rw.py 2010-03-24 08:01:45.000000000 -0400
@@ -0,0 +1,127 @@ @@ -0,0 +1,131 @@
+# Copyright (C) 2007 Red Hat +# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information +# see file 'COPYING' for use and warranty information
+# +#
@ -12475,7 +12469,8 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/rw.py poli
+ +
+######################################## +########################################
+## <summary> +## <summary>
+## Manage TEMPLATETYPE rw files. +## Create, read, write, and delete
+## TEMPLATETYPE rw dirs.
+## </summary> +## </summary>
+## <param name="domain"> +## <param name="domain">
+## <summary> +## <summary>
@ -12483,33 +12478,36 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/rw.py poli
+## </summary> +## </summary>
+## </param> +## </param>
+# +#
+interface(`TEMPLATETYPE_manage_rw',` +interface(`TEMPLATETYPE_manage_rw_dirs',`
+ gen_require(` + gen_require(`
+ type TEMPLATETYPE_rw_t; + type TEMPLATETYPE_rw_t;
+ ') + ')
+ +
+ manage_dirs_pattern($1, TEMPLATETYPE_rw_t, TEMPLATETYPE_rw_t) + manage_dirs_pattern($1, TEMPLATETYPE_rw_t, TEMPLATETYPE_rw_t)
+ manage_files_pattern($1, TEMPLATETYPE_rw_t, TEMPLATETYPE_rw_t)
+ manage_lnk_files_pattern($1, TEMPLATETYPE_rw_t, TEMPLATETYPE_rw_t)
+') +')
+ +
+""" +"""
+ +
+if_admin_types="""
+ type TEMPLATETYPE_rw_t;"""
+
+if_admin_rules=""" +if_admin_rules="""
+ TEMPLATETYPE_manage_rw($1) + files_search_etc($1)
+ admin_pattern($1, TEMPLATETYPE_rw_t)
+""" +"""
+ +
+
+########################### File Context ################################## +########################### File Context ##################################
+fc_file=""" +fc_file="""
+FILENAME -- gen_context(system_u:object_r:TEMPLATETYPE_rw_t,s0) +FILENAME -- gen_context(system_u:object_r:TEMPLATETYPE_rw_t,s0)
+""" +"""
+ +
+fc_dir=""" +fc_dir="""
+FILENAME(/.*)? gen_context(system_u:object_r:TEMPLATETYPE_rw_t,s0) +FILENAME(/.*)? gen_context(system_u:object_r:TEMPLATETYPE_rw_t,s0)
+""" +"""
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/script.py policycoreutils-2.0.78/gui/templates/script.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/script.py policycoreutils-2.0.81/gui/templates/script.py
--- nsapolicycoreutils/gui/templates/script.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/templates/script.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/templates/script.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/templates/script.py 2010-03-24 08:01:45.000000000 -0400
@@ -0,0 +1,126 @@ @@ -0,0 +1,126 @@
+# Copyright (C) 2007 Red Hat +# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information +# see file 'COPYING' for use and warranty information
@ -12637,9 +12635,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/script.py
+_EOF +_EOF
+fi +fi
+""" +"""
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/semodule.py policycoreutils-2.0.78/gui/templates/semodule.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/semodule.py policycoreutils-2.0.81/gui/templates/semodule.py
--- nsapolicycoreutils/gui/templates/semodule.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/templates/semodule.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/templates/semodule.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/templates/semodule.py 2010-03-24 08:01:45.000000000 -0400
@@ -0,0 +1,41 @@ @@ -0,0 +1,41 @@
+# Copyright (C) 2007 Red Hat +# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information +# see file 'COPYING' for use and warranty information
@ -12682,10 +12680,10 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/semodule.p
+semanage ports -a -t TEMPLATETYPE_port_t -p udp PORTNUM +semanage ports -a -t TEMPLATETYPE_port_t -p udp PORTNUM
+""" +"""
+ +
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/tmp.py policycoreutils-2.0.78/gui/templates/tmp.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/tmp.py policycoreutils-2.0.81/gui/templates/tmp.py
--- nsapolicycoreutils/gui/templates/tmp.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/templates/tmp.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/templates/tmp.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/templates/tmp.py 2010-03-24 08:01:45.000000000 -0400
@@ -0,0 +1,97 @@ @@ -0,0 +1,102 @@
+# Copyright (C) 2007 Red Hat +# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information +# see file 'COPYING' for use and warranty information
+# +#
@ -12755,6 +12753,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/tmp.py pol
+ type TEMPLATETYPE_tmp_t; + type TEMPLATETYPE_tmp_t;
+ ') + ')
+ +
+ files_search_tmp($1)
+ allow $1 TEMPLATETYPE_tmp_t:file read_file_perms; + allow $1 TEMPLATETYPE_tmp_t:file read_file_perms;
+') +')
+ +
@ -12773,19 +12772,23 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/tmp.py pol
+ type TEMPLATETYPE_tmp_t; + type TEMPLATETYPE_tmp_t;
+ ') + ')
+ +
+ manage_dirs_pattern($1, TEMPLATETYPE_tmp_t, TEMPLATETYPE_tmp_t) + files_search_tmp($1)
+ manage_files_pattern($1, TEMPLATETYPE_tmp_t, TEMPLATETYPE_tmp_t) + manage_dirs_pattern($1, TEMPLATETYPE_tmp_t, TEMPLATETYPE_tmp_t)
+ manage_lnk_files_pattern($1, TEMPLATETYPE_tmp_t, TEMPLATETYPE_tmp_t) + manage_files_pattern($1, TEMPLATETYPE_tmp_t, TEMPLATETYPE_tmp_t)
+ manage_lnk_files_pattern($1, TEMPLATETYPE_tmp_t, TEMPLATETYPE_tmp_t)
+') +')
+""" +"""
+ +
+if_admin_rules=""" +if_admin_types="""
+ TEMPLATETYPE_manage_tmp($1) + type TEMPLATETYPE_tmp_t;"""
+"""
+ +
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/user.py policycoreutils-2.0.78/gui/templates/user.py +if_admin_rules="""
+ files_search_tmp($1)
+ admin_pattern($1, TEMPLATETYPE_tmp_t)
+"""
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/user.py policycoreutils-2.0.81/gui/templates/user.py
--- nsapolicycoreutils/gui/templates/user.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/templates/user.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/templates/user.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/templates/user.py 2010-03-24 08:01:45.000000000 -0400
@@ -0,0 +1,182 @@ @@ -0,0 +1,182 @@
+# Copyright (C) 2007 Red Hat +# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information +# see file 'COPYING' for use and warranty information
@ -12969,10 +12972,10 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/user.py po
+te_newrole_rules=""" +te_newrole_rules="""
+seutil_run_newrole(TEMPLATETYPE_t, TEMPLATETYPE_r,{ TEMPLATETYPE_devpts_t TEMPLATETYPE_tty_device_t }) +seutil_run_newrole(TEMPLATETYPE_t, TEMPLATETYPE_r,{ TEMPLATETYPE_devpts_t TEMPLATETYPE_tty_device_t })
+""" +"""
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_lib.py policycoreutils-2.0.78/gui/templates/var_lib.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_lib.py policycoreutils-2.0.81/gui/templates/var_lib.py
--- nsapolicycoreutils/gui/templates/var_lib.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/templates/var_lib.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/templates/var_lib.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/templates/var_lib.py 2010-03-24 08:01:45.000000000 -0400
@@ -0,0 +1,158 @@ @@ -0,0 +1,162 @@
+# Copyright (C) 2007 Red Hat +# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information +# see file 'COPYING' for use and warranty information
+# +#
@ -13075,7 +13078,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_lib.py
+ +
+######################################## +########################################
+## <summary> +## <summary>
+## Manage TEMPLATETYPE var_lib files. +## Manage TEMPLATETYPE lib dirs files.
+## </summary> +## </summary>
+## <param name="domain"> +## <param name="domain">
+## <summary> +## <summary>
@ -13083,14 +13086,13 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_lib.py
+## </summary> +## </summary>
+## </param> +## </param>
+# +#
+interface(`TEMPLATETYPE_manage_var_lib',` +interface(`TEMPLATETYPE_manage_lib_dirs',`
+ gen_require(` + gen_require(`
+ type TEMPLATETYPE_var_lib_t; + type TEMPLATETYPE_var_lib_t;
+ ') + ')
+ +
+ manage_dirs_pattern($1, TEMPLATETYPE_var_lib_t, TEMPLATETYPE_var_lib_t) + files_search_var_lib($1)
+ manage_files_pattern($1, TEMPLATETYPE_var_lib_t, TEMPLATETYPE_var_lib_t) + manage_dirs_pattern($1, TEMPLATETYPE_var_lib_t, TEMPLATETYPE_var_lib_t)
+ manage_lnk_files_pattern($1, TEMPLATETYPE_var_lib_t, TEMPLATETYPE_var_lib_t)
+') +')
+ +
+""" +"""
@ -13115,8 +13117,12 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_lib.py
+') +')
+""" +"""
+ +
+if_admin_types="""
+ type TEMPLATETYPE_var_lib_t;"""
+
+if_admin_rules=""" +if_admin_rules="""
+ TEMPLATETYPE_manage_var_lib($1) + files_search_var_lib($1)
+ admin_pattern($1, TEMPLATETYPE_var_lib_t)
+""" +"""
+ +
+########################### File Context ################################## +########################### File Context ##################################
@ -13129,13 +13135,14 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_lib.py
+""" +"""
+ +
+fc_dir="""\ +fc_dir="""\
+FILENAME(/.*)? gen_context(system_u:object_r:TEMPLATETYPE_var_lib_t,s0) +FILENAME(/.*)? gen_context(system_u:object_r:TEMPLATETYPE_var_lib_t,s0)
+""" +"""
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_log.py policycoreutils-2.0.78/gui/templates/var_log.py +
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_log.py policycoreutils-2.0.81/gui/templates/var_log.py
--- nsapolicycoreutils/gui/templates/var_log.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/templates/var_log.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/templates/var_log.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/templates/var_log.py 2010-03-24 08:01:45.000000000 -0400
@@ -0,0 +1,110 @@ @@ -0,0 +1,115 @@
+# Copyright (C) 2007 Red Hat +# Copyright (C) 2007,2010 Red Hat
+# see file 'COPYING' for use and warranty information +# see file 'COPYING' for use and warranty information
+# +#
+# policygentool is a tool for the initial generation of SELinux policy +# policygentool is a tool for the initial generation of SELinux policy
@ -13205,7 +13212,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_log.py
+# +#
+interface(`TEMPLATETYPE_append_log',` +interface(`TEMPLATETYPE_append_log',`
+ gen_require(` + gen_require(`
+ type var_log_t, TEMPLATETYPE_log_t; + type TEMPLATETYPE_log_t;
+ ') + ')
+ +
+ logging_search_logs($1) + logging_search_logs($1)
@ -13227,14 +13234,19 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_log.py
+ type TEMPLATETYPE_log_t; + type TEMPLATETYPE_log_t;
+ ') + ')
+ +
+ manage_dirs_pattern($1, TEMPLATETYPE_log_t, TEMPLATETYPE_log_t) + logging_search_logs($1)
+ manage_files_pattern($1, TEMPLATETYPE_log_t, TEMPLATETYPE_log_t) + manage_dirs_pattern($1, TEMPLATETYPE_log_t, TEMPLATETYPE_log_t)
+ manage_lnk_files_pattern($1, TEMPLATETYPE_log_t, TEMPLATETYPE_log_t) + manage_files_pattern($1, TEMPLATETYPE_log_t, TEMPLATETYPE_log_t)
+ manage_lnk_files_pattern($1, TEMPLATETYPE_log_t, TEMPLATETYPE_log_t)
+') +')
+""" +"""
+ +
+if_admin_types="""
+ type TEMPLATETYPE_log_t;"""
+
+if_admin_rules=""" +if_admin_rules="""
+ TEMPLATETYPE_manage_log($1) + logging_search_logs($1)
+ admin_pattern($1, TEMPLATETYPE_log_t)
+""" +"""
+ +
+########################### File Context ################################## +########################### File Context ##################################
@ -13243,13 +13255,13 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_log.py
+""" +"""
+ +
+fc_dir="""\ +fc_dir="""\
+FILENAME(/.*)? gen_context(system_u:object_r:TEMPLATETYPE_log_t,s0) +FILENAME(/.*)? gen_context(system_u:object_r:TEMPLATETYPE_log_t,s0)
+""" +"""
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_run.py policycoreutils-2.0.78/gui/templates/var_run.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_run.py policycoreutils-2.0.81/gui/templates/var_run.py
--- nsapolicycoreutils/gui/templates/var_run.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/templates/var_run.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/templates/var_run.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/templates/var_run.py 2010-03-24 08:01:45.000000000 -0400
@@ -0,0 +1,118 @@ @@ -0,0 +1,101 @@
+# Copyright (C) 2007 Red Hat +# Copyright (C) 2007,2010 Red Hat
+# see file 'COPYING' for use and warranty information +# see file 'COPYING' for use and warranty information
+# +#
+# policygentool is a tool for the initial generation of SELinux policy +# policygentool is a tool for the initial generation of SELinux policy
@ -13308,26 +13320,6 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_run.py
+ allow $1 TEMPLATETYPE_var_run_t:file read_file_perms; + allow $1 TEMPLATETYPE_var_run_t:file read_file_perms;
+') +')
+ +
+########################################
+## <summary>
+## Manage TEMPLATETYPE var_run files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_manage_var_run',`
+ gen_require(`
+ type TEMPLATETYPE_var_run_t;
+ ')
+
+ manage_dirs_pattern($1, TEMPLATETYPE_var_run_t, TEMPLATETYPE_var_run_t)
+ manage_files_pattern($1, TEMPLATETYPE_var_run_t, TEMPLATETYPE_var_run_t)
+ manage_lnk_files_pattern($1, TEMPLATETYPE_var_run_t, TEMPLATETYPE_var_run_t)
+')
+
+""" +"""
+ +
+if_stream_rules="""\ +if_stream_rules="""\
@ -13351,8 +13343,12 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_run.py
+') +')
+""" +"""
+ +
+if_admin_types="""
+ type TEMPLATETYPE_var_run_t;"""
+
+if_admin_rules=""" +if_admin_rules="""
+ TEMPLATETYPE_manage_var_run($1) + files_search_pids($1)
+ admin_pattern($1, TEMPLATETYPE_var_run_t)
+""" +"""
+ +
+fc_file="""\ +fc_file="""\
@ -13364,13 +13360,12 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_run.py
+""" +"""
+ +
+fc_dir="""\ +fc_dir="""\
+FILENAME(/.*)? gen_context(system_u:object_r:TEMPLATETYPE_var_run_t,s0) +FILENAME(/.*)? gen_context(system_u:object_r:TEMPLATETYPE_var_run_t,s0)
+""" +"""
+ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_spool.py policycoreutils-2.0.81/gui/templates/var_spool.py
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_spool.py policycoreutils-2.0.78/gui/templates/var_spool.py
--- nsapolicycoreutils/gui/templates/var_spool.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/templates/var_spool.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/templates/var_spool.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/templates/var_spool.py 2010-03-24 08:01:45.000000000 -0400
@@ -0,0 +1,129 @@ @@ -0,0 +1,133 @@
+# Copyright (C) 2007 Red Hat +# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information +# see file 'COPYING' for use and warranty information
+# +#
@ -13468,28 +13463,32 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_spool.
+ +
+######################################## +########################################
+## <summary> +## <summary>
+## Allow domain to manage TEMPLATETYPE spool files +## Create, read, write, and delete
+## TEMPLATETYPE spool dirs.
+## </summary> +## </summary>
+## <param name="domain"> +## <param name="domain">
+## <summary> +## <summary>
+## Domain to not audit. +## Domain allowed access.
+## </summary> +## </summary>
+## </param> +## </param>
+# +#
+interface(`TEMPLATETYPE_manage_spool',` +interface(`TEMPLATETYPE_manage_spool_dirs',`
+ gen_require(` + gen_require(`
+ type TEMPLATETYPE_spool_t; + type TEMPLATETYPE_spool_t;
+ ') + ')
+ +
+ manage_dirs_pattern($1, TEMPLATETYPE_spool_t, TEMPLATETYPE_spool_t) + files_search_spool($1)
+ manage_files_pattern($1, TEMPLATETYPE_spool_t, TEMPLATETYPE_spool_t) + manage_dirs_pattern($1, TEMPLATETYPE_spool_t, TEMPLATETYPE_spool_t)
+ manage_lnk_files_pattern($1, TEMPLATETYPE_spool_t, TEMPLATETYPE_spool_t)
+') +')
+ +
+""" +"""
+ +
+if_admin_types="""
+ type TEMPLATETYPE_spool_t;"""
+
+if_admin_rules=""" +if_admin_rules="""
+ TEMPLATETYPE_manage_spool($1) + files_search_spool($1)
+ admin_pattern($1, TEMPLATETYPE_spool_t)
+""" +"""
+ +
+########################### File Context ################################## +########################### File Context ##################################
@ -13498,11 +13497,11 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_spool.
+""" +"""
+ +
+fc_dir="""\ +fc_dir="""\
+FILENAME(/.*)? gen_context(system_u:object_r:TEMPLATETYPE_spool_t,s0) +FILENAME(/.*)? gen_context(system_u:object_r:TEMPLATETYPE_spool_t,s0)
+""" +"""
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/usersPage.py policycoreutils-2.0.78/gui/usersPage.py diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/usersPage.py policycoreutils-2.0.81/gui/usersPage.py
--- nsapolicycoreutils/gui/usersPage.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/gui/usersPage.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.78/gui/usersPage.py 2009-12-08 17:05:49.000000000 -0500 +++ policycoreutils-2.0.81/gui/usersPage.py 2010-03-12 10:04:14.000000000 -0500
@@ -0,0 +1,150 @@ @@ -0,0 +1,150 @@
+## usersPage.py - show selinux mappings +## usersPage.py - show selinux mappings
+## Copyright (C) 2006,2007,2008 Red Hat, Inc. +## Copyright (C) 2006,2007,2008 Red Hat, Inc.

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/audit2allow/audit2allow policycoreutils-2.0.81/audit2allow/audit2allow diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/audit2allow/audit2allow policycoreutils-2.0.81/audit2allow/audit2allow
--- nsapolicycoreutils/audit2allow/audit2allow 2010-03-12 09:34:56.000000000 -0500 --- nsapolicycoreutils/audit2allow/audit2allow 2010-03-22 14:08:29.000000000 -0400
+++ policycoreutils-2.0.81/audit2allow/audit2allow 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/audit2allow/audit2allow 2010-03-12 10:04:13.000000000 -0500
@@ -28,6 +28,7 @@ @@ -28,6 +28,7 @@
import sepolgen.defaults as defaults import sepolgen.defaults as defaults
@ -9,44 +9,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
class AuditToPolicy: class AuditToPolicy:
VERSION = "%prog .1" VERSION = "%prog .1"
@@ -42,6 +43,8 @@ @@ -231,63 +232,44 @@
from optparse import OptionParser
parser = OptionParser(version=self.VERSION)
+ parser.add_option("-b", "--boot", action="store_true", dest="boot", default=False,
+ help="audit messages since last boot conflicts with -i")
parser.add_option("-a", "--all", action="store_true", dest="audit", default=False,
help="read input from audit log - conflicts with -i")
parser.add_option("-d", "--dmesg", action="store_true", dest="dmesg", default=False,
@@ -83,11 +86,11 @@
options, args = parser.parse_args()
# Make -d, -a, and -i conflict
- if options.audit is True:
+ if options.audit is True or options.boot:
if options.input is not None:
- sys.stderr.write("error: --all conflicts with --input\n")
+ sys.stderr.write("error: --all/--boot conflicts with --input\n")
if options.dmesg is True:
- sys.stderr.write("error: --all conflicts with --dmesg\n")
+ sys.stderr.write("error: --all/--boot conflicts with --dmesg\n")
if options.input is not None and options.dmesg is True:
sys.stderr.write("error: --input conflicts with --dmesg\n")
@@ -132,6 +135,12 @@
except OSError, e:
sys.stderr.write('could not run ausearch - "%s"\n' % str(e))
sys.exit(1)
+ elif self.__options.boot:
+ try:
+ messages = audit.get_audit_boot_msgs()
+ except OSError, e:
+ sys.stderr.write('could not run ausearch - "%s"\n' % str(e))
+ sys.exit(1)
else:
# This is the default if no input is specified
f = sys.stdin
@@ -223,63 +232,44 @@
def __output_audit2why(self): def __output_audit2why(self):
import selinux import selinux
@ -122,14 +85,14 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
print "\t\tMissing role allow rule.\n" print "\t\tMissing role allow rule.\n"
print "\t\tAdd an allow rule for the role pair.\n" print "\t\tAdd an allow rule for the role pair.\n"
continue continue
@@ -349,5 +339,6 @@ @@ -357,5 +339,6 @@
sys.exit(0) sys.exit(0)
if __name__ == "__main__": if __name__ == "__main__":
+ audit2why.init() + audit2why.init()
app = AuditToPolicy() app = AuditToPolicy()
app.main() app.main()
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/Makefile policycoreutils-2.0.81/Makefile diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/Makefile policycoreutils-2.0.81/Makefile
--- nsapolicycoreutils/Makefile 2008-08-28 09:34:24.000000000 -0400 --- nsapolicycoreutils/Makefile 2008-08-28 09:34:24.000000000 -0400
+++ policycoreutils-2.0.81/Makefile 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/Makefile 2010-03-12 10:04:13.000000000 -0500
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
@ -138,7 +101,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
INOTIFYH = $(shell ls /usr/include/sys/inotify.h 2>/dev/null) INOTIFYH = $(shell ls /usr/include/sys/inotify.h 2>/dev/null)
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/newrole/newrole.c policycoreutils-2.0.81/newrole/newrole.c diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/newrole/newrole.c policycoreutils-2.0.81/newrole/newrole.c
--- nsapolicycoreutils/newrole/newrole.c 2010-02-16 12:33:05.000000000 -0500 --- nsapolicycoreutils/newrole/newrole.c 2010-02-16 12:33:05.000000000 -0500
+++ policycoreutils-2.0.81/newrole/newrole.c 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/newrole/newrole.c 2010-03-12 10:04:13.000000000 -0500
@@ -1334,6 +1334,9 @@ @@ -1334,6 +1334,9 @@
@ -151,7 +114,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
#ifdef NAMESPACE_PRIV #ifdef NAMESPACE_PRIV
if (transition_to_caller_uid()) if (transition_to_caller_uid())
goto err_close_pam_session; goto err_close_pam_session;
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/Makefile policycoreutils-2.0.81/restorecond/Makefile diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/Makefile policycoreutils-2.0.81/restorecond/Makefile
--- nsapolicycoreutils/restorecond/Makefile 2009-08-20 15:49:21.000000000 -0400 --- nsapolicycoreutils/restorecond/Makefile 2009-08-20 15:49:21.000000000 -0400
+++ policycoreutils-2.0.81/restorecond/Makefile 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/restorecond/Makefile 2010-03-12 10:04:13.000000000 -0500
@@ -1,17 +1,28 @@ @@ -1,17 +1,28 @@
@ -200,14 +163,14 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
relabel: install relabel: install
/sbin/restorecon $(SBINDIR)/restorecond /sbin/restorecon $(SBINDIR)/restorecond
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/org.selinux.Restorecond.service policycoreutils-2.0.81/restorecond/org.selinux.Restorecond.service diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/org.selinux.Restorecond.service policycoreutils-2.0.81/restorecond/org.selinux.Restorecond.service
--- nsapolicycoreutils/restorecond/org.selinux.Restorecond.service 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/restorecond/org.selinux.Restorecond.service 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.81/restorecond/org.selinux.Restorecond.service 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/restorecond/org.selinux.Restorecond.service 2010-03-12 10:04:13.000000000 -0500
@@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
+[D-BUS Service] +[D-BUS Service]
+Name=org.selinux.Restorecond +Name=org.selinux.Restorecond
+Exec=/usr/sbin/restorecond -u +Exec=/usr/sbin/restorecond -u
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.8 policycoreutils-2.0.81/restorecond/restorecond.8 diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.8 policycoreutils-2.0.81/restorecond/restorecond.8
--- nsapolicycoreutils/restorecond/restorecond.8 2009-08-20 15:49:21.000000000 -0400 --- nsapolicycoreutils/restorecond/restorecond.8 2009-08-20 15:49:21.000000000 -0400
+++ policycoreutils-2.0.81/restorecond/restorecond.8 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/restorecond/restorecond.8 2010-03-12 10:04:13.000000000 -0500
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
@ -244,7 +207,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
.SH "SEE ALSO" .SH "SEE ALSO"
.BR restorecon (8), .BR restorecon (8),
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.c policycoreutils-2.0.81/restorecond/restorecond.c diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.c policycoreutils-2.0.81/restorecond/restorecond.c
--- nsapolicycoreutils/restorecond/restorecond.c 2009-08-20 15:49:21.000000000 -0400 --- nsapolicycoreutils/restorecond/restorecond.c 2009-08-20 15:49:21.000000000 -0400
+++ policycoreutils-2.0.81/restorecond/restorecond.c 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/restorecond/restorecond.c 2010-03-12 10:04:13.000000000 -0500
@@ -30,9 +30,11 @@ @@ -30,9 +30,11 @@
@ -753,7 +716,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
} }
+ +
+ +
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.conf policycoreutils-2.0.81/restorecond/restorecond.conf diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.conf policycoreutils-2.0.81/restorecond/restorecond.conf
--- nsapolicycoreutils/restorecond/restorecond.conf 2009-08-20 15:49:21.000000000 -0400 --- nsapolicycoreutils/restorecond/restorecond.conf 2009-08-20 15:49:21.000000000 -0400
+++ policycoreutils-2.0.81/restorecond/restorecond.conf 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/restorecond/restorecond.conf 2010-03-12 10:04:13.000000000 -0500
@@ -4,8 +4,5 @@ @@ -4,8 +4,5 @@
@ -766,7 +729,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
/root/.ssh/* /root/.ssh/*
- -
- -
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.desktop policycoreutils-2.0.81/restorecond/restorecond.desktop diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.desktop policycoreutils-2.0.81/restorecond/restorecond.desktop
--- nsapolicycoreutils/restorecond/restorecond.desktop 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/restorecond/restorecond.desktop 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.81/restorecond/restorecond.desktop 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/restorecond/restorecond.desktop 2010-03-12 10:04:13.000000000 -0500
@@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
@ -777,7 +740,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+Encoding=UTF-8 +Encoding=UTF-8
+Type=Application +Type=Application
+StartupNotify=false +StartupNotify=false
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.h policycoreutils-2.0.81/restorecond/restorecond.h diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.h policycoreutils-2.0.81/restorecond/restorecond.h
--- nsapolicycoreutils/restorecond/restorecond.h 2009-08-20 15:49:21.000000000 -0400 --- nsapolicycoreutils/restorecond/restorecond.h 2009-08-20 15:49:21.000000000 -0400
+++ policycoreutils-2.0.81/restorecond/restorecond.h 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/restorecond/restorecond.h 2010-03-12 10:04:13.000000000 -0500
@@ -24,7 +24,22 @@ @@ -24,7 +24,22 @@
@ -805,9 +768,18 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+extern int watch_list_isempty(); +extern int watch_list_isempty();
#endif #endif
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.init policycoreutils-2.0.81/restorecond/restorecond.init diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.init policycoreutils-2.0.81/restorecond/restorecond.init
--- nsapolicycoreutils/restorecond/restorecond.init 2009-08-20 15:49:21.000000000 -0400 --- nsapolicycoreutils/restorecond/restorecond.init 2009-08-20 15:49:21.000000000 -0400
+++ policycoreutils-2.0.81/restorecond/restorecond.init 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/restorecond/restorecond.init 2010-03-24 08:37:19.000000000 -0400
@@ -26,7 +26,7 @@
# Source function library.
. /etc/rc.d/init.d/functions
-[ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled || exit 0
+[ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled || exit 7
# Check that we are root ... so non-root users stop here
test $EUID = 0 || exit 4
@@ -75,16 +75,15 @@ @@ -75,16 +75,15 @@
status restorecond status restorecond
RETVAL=$? RETVAL=$?
@ -827,13 +799,13 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
exit $RETVAL exit $RETVAL
- -
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond_user.conf policycoreutils-2.0.81/restorecond/restorecond_user.conf diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond_user.conf policycoreutils-2.0.81/restorecond/restorecond_user.conf
--- nsapolicycoreutils/restorecond/restorecond_user.conf 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/restorecond/restorecond_user.conf 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.81/restorecond/restorecond_user.conf 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/restorecond/restorecond_user.conf 2010-03-12 10:04:13.000000000 -0500
@@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
+~/* +~/*
+~/public_html/* +~/public_html/*
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/user.c policycoreutils-2.0.81/restorecond/user.c diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/user.c policycoreutils-2.0.81/restorecond/user.c
--- nsapolicycoreutils/restorecond/user.c 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/restorecond/user.c 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.81/restorecond/user.c 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/restorecond/user.c 2010-03-12 10:04:13.000000000 -0500
@@ -0,0 +1,239 @@ @@ -0,0 +1,239 @@
@ -1076,7 +1048,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+ return 0; + return 0;
+} +}
+ +
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/watch.c policycoreutils-2.0.81/restorecond/watch.c diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/watch.c policycoreutils-2.0.81/restorecond/watch.c
--- nsapolicycoreutils/restorecond/watch.c 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/restorecond/watch.c 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.81/restorecond/watch.c 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/restorecond/watch.c 2010-03-12 10:04:13.000000000 -0500
@@ -0,0 +1,260 @@ @@ -0,0 +1,260 @@
@ -1340,7 +1312,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+ if (master_wd == -1) + if (master_wd == -1)
+ exitApp("Error watching config file."); + exitApp("Error watching config file.");
+} +}
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/deliverables/basicwrapper policycoreutils-2.0.81/sandbox/deliverables/basicwrapper diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/deliverables/basicwrapper policycoreutils-2.0.81/sandbox/deliverables/basicwrapper
--- nsapolicycoreutils/sandbox/deliverables/basicwrapper 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/sandbox/deliverables/basicwrapper 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.81/sandbox/deliverables/basicwrapper 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/sandbox/deliverables/basicwrapper 2010-03-12 10:04:13.000000000 -0500
@@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
@ -1348,7 +1320,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+SANDBOX_ARGS = ['-f%s' % os.environ['_CONDOR_SCRATCH_DIR']] +SANDBOX_ARGS = ['-f%s' % os.environ['_CONDOR_SCRATCH_DIR']]
+SANDBOX_ARGS.extend(sys.argv[1::]) +SANDBOX_ARGS.extend(sys.argv[1::])
+os.execv('/usr/bin/sandbox',SANDBOX_ARGS) +os.execv('/usr/bin/sandbox',SANDBOX_ARGS)
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/deliverables/README policycoreutils-2.0.81/sandbox/deliverables/README diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/deliverables/README policycoreutils-2.0.81/sandbox/deliverables/README
--- nsapolicycoreutils/sandbox/deliverables/README 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/sandbox/deliverables/README 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.81/sandbox/deliverables/README 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/sandbox/deliverables/README 2010-03-12 10:04:13.000000000 -0500
@@ -0,0 +1,32 @@ @@ -0,0 +1,32 @@
@ -1384,7 +1356,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+ +
+Thanks for a great summer. +Thanks for a great summer.
+Chris Pardy +Chris Pardy
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/deliverables/run-in-sandbox.py policycoreutils-2.0.81/sandbox/deliverables/run-in-sandbox.py diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/deliverables/run-in-sandbox.py policycoreutils-2.0.81/sandbox/deliverables/run-in-sandbox.py
--- nsapolicycoreutils/sandbox/deliverables/run-in-sandbox.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/sandbox/deliverables/run-in-sandbox.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.81/sandbox/deliverables/run-in-sandbox.py 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/sandbox/deliverables/run-in-sandbox.py 2010-03-12 10:04:13.000000000 -0500
@@ -0,0 +1,49 @@ @@ -0,0 +1,49 @@
@ -1437,7 +1409,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+ def get_background_items(self, window, file): + def get_background_items(self, window, file):
+ return + return
+ +
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/deliverables/sandbox policycoreutils-2.0.81/sandbox/deliverables/sandbox diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/deliverables/sandbox policycoreutils-2.0.81/sandbox/deliverables/sandbox
--- nsapolicycoreutils/sandbox/deliverables/sandbox 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/sandbox/deliverables/sandbox 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.81/sandbox/deliverables/sandbox 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/sandbox/deliverables/sandbox 2010-03-12 10:04:13.000000000 -0500
@@ -0,0 +1,216 @@ @@ -0,0 +1,216 @@
@ -1657,7 +1629,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+ +
+ sys.exit(rc) + sys.exit(rc)
+ +
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/Makefile policycoreutils-2.0.81/sandbox/Makefile diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/Makefile policycoreutils-2.0.81/sandbox/Makefile
--- nsapolicycoreutils/sandbox/Makefile 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/sandbox/Makefile 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.81/sandbox/Makefile 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/sandbox/Makefile 2010-03-12 10:04:13.000000000 -0500
@@ -0,0 +1,41 @@ @@ -0,0 +1,41 @@
@ -1702,10 +1674,10 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+ ../../scripts/Lindent $(wildcard *.[ch]) + ../../scripts/Lindent $(wildcard *.[ch])
+ +
+relabel: +relabel:
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/sandbox policycoreutils-2.0.81/sandbox/sandbox diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/sandbox policycoreutils-2.0.81/sandbox/sandbox
--- nsapolicycoreutils/sandbox/sandbox 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/sandbox/sandbox 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.81/sandbox/sandbox 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/sandbox/sandbox 2010-03-23 15:02:30.000000000 -0400
@@ -0,0 +1,415 @@ @@ -0,0 +1,420 @@
+#! /usr/bin/python -E +#! /usr/bin/python -E
+# Authors: Dan Walsh <dwalsh@redhat.com> +# Authors: Dan Walsh <dwalsh@redhat.com>
+# Authors: Josh Cogliati +# Authors: Josh Cogliati
@ -1918,7 +1890,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+ copyfile(f, homedir, self.__homedir) + copyfile(f, homedir, self.__homedir)
+ copyfile(f, "/tmp", self.__tmpdir) + copyfile(f, "/tmp", self.__tmpdir)
+ +
+ def __setup_sandboxrc(self): + def __setup_sandboxrc(self, wm = "/usr/bin/matchbox-window-manager -use_titlebar no"):
+ execfile =self.__homedir + "/.sandboxrc" + execfile =self.__homedir + "/.sandboxrc"
+ fd = open(execfile, "w+") + fd = open(execfile, "w+")
+ if self.__options.session: + if self.__options.session:
@ -1931,11 +1903,11 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+ fd.write("""#! /bin/sh + fd.write("""#! /bin/sh
+#TITLE: %s +#TITLE: %s
+/usr/bin/test -r ~/.xmodmap && /usr/bin/xmodmap ~/.xmodmap +/usr/bin/test -r ~/.xmodmap && /usr/bin/xmodmap ~/.xmodmap
+/usr/bin/matchbox-window-manager -use_titlebar no & +%s &
+WM_PID=$! +WM_PID=$!
+%s +%s
+kill -TERM $WM_PID 2> /dev/null +kill -TERM $WM_PID 2> /dev/null
+""" % (command, command)) +""" % (command, wm, command))
+ fd.close() + fd.close()
+ os.chmod(execfile, 0700) + os.chmod(execfile, 0700)
+ +
@ -1945,9 +1917,9 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+ def __parse_options(self): + def __parse_options(self):
+ from optparse import OptionParser + from optparse import OptionParser
+ usage = _(""" + usage = _("""
+sandbox [-h] [-[X|M] [-l level ] [-H homedir] [-T tempdir]] [-I includefile ] [[-i file ] ...] [ -t type ] command +sandbox [-h] [-[X|M] [-l level ] [-H homedir] [-T tempdir]] [-I includefile ] [-W windowmanager ] [[-i file ] ...] [ -t type ] command
+ +
+sandbox [-h] [-[X|M] [-l level ] [-H homedir] [-T tempdir]] [-I includefile ] [[-i file ] ...] [ -t type ] -S +sandbox [-h] [-[X|M] [-l level ] [-H homedir] [-T tempdir]] [-I includefile ] [-W windowmanager ] [[-i file ] ...] [ -t type ] -S
+""") +""")
+ +
+ parser = OptionParser(version=self.VERSION, usage=usage) + parser = OptionParser(version=self.VERSION, usage=usage)
@ -1982,6 +1954,11 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+ action="callback", callback=self.__validdir, + action="callback", callback=self.__validdir,
+ help="Alternate tempdir to use for mounting") + help="Alternate tempdir to use for mounting")
+ +
+ parser.add_option("-W", "--windowmanager", dest="wm",
+ type="string",
+ default="/usr/bin/matchbox-window-manager -use_titlebar no",
+ help="Alternate window maanger")
+
+ parser.add_option("-l", "--level", dest="level", + parser.add_option("-l", "--level", dest="level",
+ help="MCS/MLS Level for the sandbox") + help="MCS/MLS Level for the sandbox")
+ +
@ -2063,7 +2040,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+ subprocess.Popen(["/usr/bin/xmodmap","-pke"],stdout=xd).wait() + subprocess.Popen(["/usr/bin/xmodmap","-pke"],stdout=xd).wait()
+ xd.close() + xd.close()
+ +
+ self.__setup_sandboxrc() + self.__setup_sandboxrc(self.__options.wm)
+ +
+ cmds = ("/usr/sbin/seunshare -t %s -h %s -- %s /usr/share/sandbox/sandboxX.sh" % (self.__tmpdir, self.__homedir, self.__execcon)).split() + cmds = ("/usr/sbin/seunshare -t %s -h %s -- %s /usr/share/sandbox/sandboxX.sh" % (self.__tmpdir, self.__homedir, self.__execcon)).split()
+ rc = os.spawnvp(os.P_WAIT, cmds[0], cmds) + rc = os.spawnvp(os.P_WAIT, cmds[0], cmds)
@ -2121,16 +2098,16 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+ rc = 0 + rc = 0
+ +
+ sys.exit(rc) + sys.exit(rc)
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/sandbox.8 policycoreutils-2.0.81/sandbox/sandbox.8 diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/sandbox.8 policycoreutils-2.0.81/sandbox/sandbox.8
--- nsapolicycoreutils/sandbox/sandbox.8 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/sandbox/sandbox.8 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.81/sandbox/sandbox.8 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/sandbox/sandbox.8 2010-03-23 15:09:03.000000000 -0400
@@ -0,0 +1,50 @@ @@ -0,0 +1,56 @@
+.TH SANDBOX "8" "May 2009" "chcat" "User Commands" +.TH SANDBOX "8" "May 2009" "chcat" "User Commands"
+.SH NAME +.SH NAME
+sandbox \- Run cmd under an SELinux sandbox +sandbox \- Run cmd under an SELinux sandbox
+.SH SYNOPSIS +.SH SYNOPSIS
+.B sandbox +.B sandbox
+[-l level ] [[-M | -X] -H homedir -T tmpdir ] [-I includefile ] [[-i file ]...] [ -t type ] cmd +[-l level ] [[-M | -X] -H homedir -T tmpdir ] [-I includefile ] [ -W windowmanager ] [[-i file ]...] [ -t type ] cmd
+.br +.br
+.SH DESCRIPTION +.SH DESCRIPTION
+.PP +.PP
@ -2147,41 +2124,47 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+If directories are specified with -H or -T the directory will have its context modified with chcon(1) unless a level is specified with -l. If the MLS/MCS security level is specified, the directories need to have a matching label. +If directories are specified with -H or -T the directory will have its context modified with chcon(1) unless a level is specified with -l. If the MLS/MCS security level is specified, the directories need to have a matching label.
+.PP +.PP
+.TP +.TP
+\fB\-t type\fR +\fB\-H\ homedir
+Use alternate sandbox type, defaults to sandbox_t or sandbox_x_t for -X. +Use alternate homedir to mount. Defaults to temporary. Requires -X or -M.
+.TP +.TP
+\fB\-i file\fR +\fB\-i file\fR
+Copy this file into the temporary sandbox appriate. Command can be repeated. +Copy this file into the temporary sandbox appriate. Command can be repeated.
+.TP +.TP
+\fB\-I inputfile\fR +\fB\-I inputfile\fR Copy all files listed in inputfile into the
+Copy all files listed in inputfile into the appropriate temporary sandbox direcories. +appropriate temporary sandbox direcories.
+.TP +.TP
+\fB\-l\fR +\fB\-l\fR
+Specify the MLS/MCS Security Level to run the sandbox in. Defaults to random. +Specify the MLS/MCS Security Level to run the sandbox in. Defaults to random.
+.TP +.TP
+\fB\-X\fR
+Create an X based Sandbox for gui apps, temporary files for $HOME and /tmp, seconday Xserver, defaults to sandbox_x_t
+.TP
+\fB\-M\fR +\fB\-M\fR
+Create a Sandbox with temporary files for $HOME and /tmp, defaults to sandbox_t +Create a Sandbox with temporary files for $HOME and /tmp, defaults to sandbox_t
+.TP +.TP
+\fB\-H\ homedir +\fB\-t type\fR
+Use alternate homedir to mount. Defaults to temporary. Requires -X or -M. +Use alternate sandbox type, defaults to sandbox_t or sandbox_x_t for -X.
+.TP +.TP
+\fB\-T\ tmpdir +\fB\-T\ tmpdir
+Use alternate tempdir to mount. Defaults to temporary. Requires -X or -M. +Use alternate tempdir to mount. Defaults to temporary. Requires -X or -M.
+.TP
+\fB\-W windowmanager\fR
+Select alternative window manager to run within
+.B sandbox -X.
+Default to /usr/bin/matchbox-window-manager.
+.TP
+\fB\-X\fR
+Create an X based Sandbox for gui apps, temporary files for
+$HOME and /tmp, seconday Xserver, defaults to sandbox_x_t
+.PP +.PP
+.SH "SEE ALSO" +.SH "SEE ALSO"
+.TP +.TP
+runcon(1) +runcon(1)
+.PP +.PP
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/sandbox.config policycoreutils-2.0.81/sandbox/sandbox.config diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/sandbox.config policycoreutils-2.0.81/sandbox/sandbox.config
--- nsapolicycoreutils/sandbox/sandbox.config 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/sandbox/sandbox.config 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.81/sandbox/sandbox.config 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/sandbox/sandbox.config 2010-03-12 10:04:13.000000000 -0500
@@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
+# Space separate list of homedirs +# Space separate list of homedirs
+HOMEDIRS="/home" +HOMEDIRS="/home"
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/sandbox.init policycoreutils-2.0.81/sandbox/sandbox.init diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/sandbox.init policycoreutils-2.0.81/sandbox/sandbox.init
--- nsapolicycoreutils/sandbox/sandbox.init 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/sandbox/sandbox.init 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.81/sandbox/sandbox.init 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/sandbox/sandbox.init 2010-03-12 10:04:13.000000000 -0500
@@ -0,0 +1,67 @@ @@ -0,0 +1,67 @@
@ -2252,7 +2235,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+ exit 3 + exit 3
+ ;; + ;;
+esac +esac
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/sandboxX.sh policycoreutils-2.0.81/sandbox/sandboxX.sh diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/sandboxX.sh policycoreutils-2.0.81/sandbox/sandboxX.sh
--- nsapolicycoreutils/sandbox/sandboxX.sh 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/sandbox/sandboxX.sh 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.81/sandbox/sandboxX.sh 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/sandbox/sandboxX.sh 2010-03-12 10:04:13.000000000 -0500
@@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
@ -2271,7 +2254,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+ break + break
+done +done
+exit 0 +exit 0
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/seunshare.c policycoreutils-2.0.81/sandbox/seunshare.c diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/seunshare.c policycoreutils-2.0.81/sandbox/seunshare.c
--- nsapolicycoreutils/sandbox/seunshare.c 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/sandbox/seunshare.c 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.81/sandbox/seunshare.c 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/sandbox/seunshare.c 2010-03-12 10:04:13.000000000 -0500
@@ -0,0 +1,265 @@ @@ -0,0 +1,265 @@
@ -2540,7 +2523,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+ +
+ return status; + return status;
+} +}
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/test_sandbox.py policycoreutils-2.0.81/sandbox/test_sandbox.py diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/sandbox/test_sandbox.py policycoreutils-2.0.81/sandbox/test_sandbox.py
--- nsapolicycoreutils/sandbox/test_sandbox.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/sandbox/test_sandbox.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.81/sandbox/test_sandbox.py 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/sandbox/test_sandbox.py 2010-03-12 10:04:13.000000000 -0500
@@ -0,0 +1,98 @@ @@ -0,0 +1,98 @@
@ -2642,7 +2625,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+ unittest.main() + unittest.main()
+ else: + else:
+ print "SELinux must be in enforcing mode for this test" + print "SELinux must be in enforcing mode for this test"
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/fixfiles policycoreutils-2.0.81/scripts/fixfiles diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/fixfiles policycoreutils-2.0.81/scripts/fixfiles
--- nsapolicycoreutils/scripts/fixfiles 2009-12-01 15:46:50.000000000 -0500 --- nsapolicycoreutils/scripts/fixfiles 2009-12-01 15:46:50.000000000 -0500
+++ policycoreutils-2.0.81/scripts/fixfiles 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/scripts/fixfiles 2010-03-12 10:04:13.000000000 -0500
@@ -21,6 +21,17 @@ @@ -21,6 +21,17 @@
@ -2730,7 +2713,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
restore restore
} }
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/default_encoding/default_encoding.c policycoreutils-2.0.81/semanage/default_encoding/default_encoding.c diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/default_encoding/default_encoding.c policycoreutils-2.0.81/semanage/default_encoding/default_encoding.c
--- nsapolicycoreutils/semanage/default_encoding/default_encoding.c 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/semanage/default_encoding/default_encoding.c 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.81/semanage/default_encoding/default_encoding.c 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/semanage/default_encoding/default_encoding.c 2010-03-12 10:04:13.000000000 -0500
@@ -0,0 +1,59 @@ @@ -0,0 +1,59 @@
@ -2793,7 +2776,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+ PyUnicode_SetDefaultEncoding("utf-8"); + PyUnicode_SetDefaultEncoding("utf-8");
+ m = Py_InitModule3("default_encoding_utf8", methods, "Forces the default encoding to utf-8"); + m = Py_InitModule3("default_encoding_utf8", methods, "Forces the default encoding to utf-8");
+} +}
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/default_encoding/Makefile policycoreutils-2.0.81/semanage/default_encoding/Makefile diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/default_encoding/Makefile policycoreutils-2.0.81/semanage/default_encoding/Makefile
--- nsapolicycoreutils/semanage/default_encoding/Makefile 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/semanage/default_encoding/Makefile 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.81/semanage/default_encoding/Makefile 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/semanage/default_encoding/Makefile 2010-03-12 10:04:13.000000000 -0500
@@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
@ -2805,7 +2788,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+ +
+clean: +clean:
+ rm -rf build *~ + rm -rf build *~
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/default_encoding/policycoreutils/__init__.py policycoreutils-2.0.81/semanage/default_encoding/policycoreutils/__init__.py diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/default_encoding/policycoreutils/__init__.py policycoreutils-2.0.81/semanage/default_encoding/policycoreutils/__init__.py
--- nsapolicycoreutils/semanage/default_encoding/policycoreutils/__init__.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/semanage/default_encoding/policycoreutils/__init__.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.81/semanage/default_encoding/policycoreutils/__init__.py 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/semanage/default_encoding/policycoreutils/__init__.py 2010-03-12 10:04:13.000000000 -0500
@@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
@ -2826,7 +2809,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+# along with this program; if not, write to the Free Software +# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# +#
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/default_encoding/setup.py policycoreutils-2.0.81/semanage/default_encoding/setup.py diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/default_encoding/setup.py policycoreutils-2.0.81/semanage/default_encoding/setup.py
--- nsapolicycoreutils/semanage/default_encoding/setup.py 1969-12-31 19:00:00.000000000 -0500 --- nsapolicycoreutils/semanage/default_encoding/setup.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.81/semanage/default_encoding/setup.py 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/semanage/default_encoding/setup.py 2010-03-12 10:04:13.000000000 -0500
@@ -0,0 +1,38 @@ @@ -0,0 +1,38 @@
@ -2868,7 +2851,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+ ext_modules = [default_encoding_utf8], + ext_modules = [default_encoding_utf8],
+ packages=["policycoreutils"], + packages=["policycoreutils"],
+) +)
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/semanage policycoreutils-2.0.81/semanage/semanage diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/semanage policycoreutils-2.0.81/semanage/semanage
--- nsapolicycoreutils/semanage/semanage 2009-11-18 17:06:03.000000000 -0500 --- nsapolicycoreutils/semanage/semanage 2009-11-18 17:06:03.000000000 -0500
+++ policycoreutils-2.0.81/semanage/semanage 2010-03-16 14:03:19.000000000 -0400 +++ policycoreutils-2.0.81/semanage/semanage 2010-03-16 14:03:19.000000000 -0400
@@ -20,6 +20,7 @@ @@ -20,6 +20,7 @@
@ -3229,7 +3212,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
errorExit(error.args[1]) errorExit(error.args[1])
+ except OSError, error: + except OSError, error:
+ errorExit(error.args[1]) + errorExit(error.args[1])
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/semanage.8 policycoreutils-2.0.81/semanage/semanage.8 diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/semanage.8 policycoreutils-2.0.81/semanage/semanage.8
--- nsapolicycoreutils/semanage/semanage.8 2009-11-18 17:06:03.000000000 -0500 --- nsapolicycoreutils/semanage/semanage.8 2009-11-18 17:06:03.000000000 -0500
+++ policycoreutils-2.0.81/semanage/semanage.8 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/semanage/semanage.8 2010-03-12 10:04:13.000000000 -0500
@@ -1,27 +1,58 @@ @@ -1,27 +1,58 @@
@ -3392,9 +3375,9 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+and Russell Coker <rcoker@redhat.com>. +and Russell Coker <rcoker@redhat.com>.
+.br +.br
Examples by Thomas Bleher <ThomasBleher@gmx.de>. Examples by Thomas Bleher <ThomasBleher@gmx.de>.
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/seobject.py policycoreutils-2.0.81/semanage/seobject.py diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/seobject.py policycoreutils-2.0.81/semanage/seobject.py
--- nsapolicycoreutils/semanage/seobject.py 2009-11-20 10:51:25.000000000 -0500 --- nsapolicycoreutils/semanage/seobject.py 2009-11-20 10:51:25.000000000 -0500
+++ policycoreutils-2.0.81/semanage/seobject.py 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/semanage/seobject.py 2010-03-23 13:43:01.000000000 -0400
@@ -29,47 +29,12 @@ @@ -29,47 +29,12 @@
import gettext import gettext
gettext.bindtextdomain(PROGNAME, "/usr/share/locale") gettext.bindtextdomain(PROGNAME, "/usr/share/locale")
@ -3406,7 +3389,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
- __builtin__.__dict__['_'] = unicode - __builtin__.__dict__['_'] = unicode
- -
-import syslog -import syslog
-
-handle = None -handle = None
- -
-def get_handle(store): -def get_handle(store):
@ -3419,7 +3402,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
- -
- if store != "": - if store != "":
- semanage_select_store(handle, store, SEMANAGE_CON_DIRECT); - semanage_select_store(handle, store, SEMANAGE_CON_DIRECT);
-
- if not semanage_is_managed(handle): - if not semanage_is_managed(handle):
- semanage_handle_destroy(handle) - semanage_handle_destroy(handle)
- raise ValueError(_("SELinux policy is not managed or store cannot be accessed.")) - raise ValueError(_("SELinux policy is not managed or store cannot be accessed."))
@ -3614,7 +3597,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
class dontauditClass(semanageRecords): class dontauditClass(semanageRecords):
def __init__(self, store): def __init__(self, store):
semanageRecords.__init__(self, store) semanageRecords.__init__(self, store)
@@ -259,6 +331,7 @@ @@ -259,14 +331,23 @@
name = semanage_module_get_name(mod) name = semanage_module_get_name(mod)
if name and name.startswith("permissive_"): if name and name.startswith("permissive_"):
l.append(name.split("permissive_")[1]) l.append(name.split("permissive_")[1])
@ -3622,7 +3605,27 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
return l return l
def list(self, heading = 1, locallist = 0): def list(self, heading = 1, locallist = 0):
@@ -343,7 +416,9 @@ - if heading:
- print "\n%-25s\n" % (_("Permissive Types"))
- for t in self.get_all():
- print t
+ import setools
+ all = map(lambda y: y["name"], filter(lambda x: x["permissive"], setools.seinfo(setools.TYPE)))
+ if heading:
+ print "\n%-25s\n" % (_("Builtin Permissive Types"))
+ customized = self.get_all()
+ for t in all:
+ if t not in customized:
+ print t
+ if heading:
+ print "\n%-25s\n" % (_("Customized Permissive Types"))
+ for t in customized:
+ print t
def add(self, type):
import glob
@@ -343,7 +424,9 @@
if rc < 0: if rc < 0:
raise ValueError(_("Could not check if login mapping for %s is defined") % name) raise ValueError(_("Could not check if login mapping for %s is defined") % name)
if exists: if exists:
@ -3633,7 +3636,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
if name[0] == '%': if name[0] == '%':
try: try:
grp.getgrnam(name[1:]) grp.getgrnam(name[1:])
@@ -475,6 +550,16 @@ @@ -475,6 +558,16 @@
mylog.log(1, "delete SELinux user mapping", name); mylog.log(1, "delete SELinux user mapping", name);
@ -3650,7 +3653,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
def get_all(self, locallist = 0): def get_all(self, locallist = 0):
ddict = {} ddict = {}
if locallist: if locallist:
@@ -489,6 +574,15 @@ @@ -489,6 +582,15 @@
ddict[name] = (semanage_seuser_get_sename(u), semanage_seuser_get_mlsrange(u)) ddict[name] = (semanage_seuser_get_sename(u), semanage_seuser_get_mlsrange(u))
return ddict return ddict
@ -3666,7 +3669,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
def list(self,heading = 1, locallist = 0): def list(self,heading = 1, locallist = 0):
ddict = self.get_all(locallist) ddict = self.get_all(locallist)
keys = ddict.keys() keys = ddict.keys()
@@ -531,7 +625,8 @@ @@ -531,7 +633,8 @@
if rc < 0: if rc < 0:
raise ValueError(_("Could not check if SELinux user %s is defined") % name) raise ValueError(_("Could not check if SELinux user %s is defined") % name)
if exists: if exists:
@ -3676,7 +3679,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
(rc, u) = semanage_user_create(self.sh) (rc, u) = semanage_user_create(self.sh)
if rc < 0: if rc < 0:
@@ -682,6 +777,16 @@ @@ -682,6 +785,16 @@
mylog.log(1,"delete SELinux user record", name) mylog.log(1,"delete SELinux user record", name)
@ -3693,7 +3696,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
def get_all(self, locallist = 0): def get_all(self, locallist = 0):
ddict = {} ddict = {}
if locallist: if locallist:
@@ -702,6 +807,15 @@ @@ -702,6 +815,15 @@
return ddict return ddict
@ -3709,7 +3712,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
def list(self, heading = 1, locallist = 0): def list(self, heading = 1, locallist = 0):
ddict = self.get_all(locallist) ddict = self.get_all(locallist)
keys = ddict.keys() keys = ddict.keys()
@@ -740,12 +854,16 @@ @@ -740,12 +862,16 @@
low = int(ports[0]) low = int(ports[0])
high = int(ports[1]) high = int(ports[1])
@ -3726,7 +3729,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
if is_mls_enabled == 1: if is_mls_enabled == 1:
if serange == "": if serange == "":
serange = "s0" serange = "s0"
@@ -808,6 +926,7 @@ @@ -808,6 +934,7 @@
self.commit() self.commit()
def __modify(self, port, proto, serange, setype): def __modify(self, port, proto, serange, setype):
@ -3734,7 +3737,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
if serange == "" and setype == "": if serange == "" and setype == "":
if is_mls_enabled == 1: if is_mls_enabled == 1:
raise ValueError(_("Requires setype or serange")) raise ValueError(_("Requires setype or serange"))
@@ -942,6 +1061,18 @@ @@ -942,6 +1069,18 @@
ddict[(ctype,proto_str)].append("%d-%d" % (low, high)) ddict[(ctype,proto_str)].append("%d-%d" % (low, high))
return ddict return ddict
@ -3753,7 +3756,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
def list(self, heading = 1, locallist = 0): def list(self, heading = 1, locallist = 0):
if heading: if heading:
print "%-30s %-8s %s\n" % (_("SELinux Port Type"), _("Proto"), _("Port Number")) print "%-30s %-8s %s\n" % (_("SELinux Port Type"), _("Proto"), _("Port Number"))
@@ -958,7 +1089,8 @@ @@ -958,7 +1097,8 @@
class nodeRecords(semanageRecords): class nodeRecords(semanageRecords):
def __init__(self, store = ""): def __init__(self, store = ""):
semanageRecords.__init__(self,store) semanageRecords.__init__(self,store)
@ -3763,7 +3766,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
def __add(self, addr, mask, proto, serange, ctype): def __add(self, addr, mask, proto, serange, ctype):
if addr == "": if addr == "":
raise ValueError(_("Node Address is required")) raise ValueError(_("Node Address is required"))
@@ -966,14 +1098,11 @@ @@ -966,14 +1106,11 @@
if mask == "": if mask == "":
raise ValueError(_("Node Netmask is required")) raise ValueError(_("Node Netmask is required"))
@ -3781,7 +3784,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
if is_mls_enabled == 1: if is_mls_enabled == 1:
if serange == "": if serange == "":
serange = "s0" serange = "s0"
@@ -991,7 +1120,8 @@ @@ -991,7 +1128,8 @@
(rc, exists) = semanage_node_exists(self.sh, k) (rc, exists) = semanage_node_exists(self.sh, k)
if exists: if exists:
@ -3791,7 +3794,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
(rc, node) = semanage_node_create(self.sh) (rc, node) = semanage_node_create(self.sh)
if rc < 0: if rc < 0:
@@ -1047,13 +1177,10 @@ @@ -1047,13 +1185,10 @@
if mask == "": if mask == "":
raise ValueError(_("Node Netmask is required")) raise ValueError(_("Node Netmask is required"))
@ -3809,7 +3812,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
if serange == "" and setype == "": if serange == "" and setype == "":
raise ValueError(_("Requires setype or serange")) raise ValueError(_("Requires setype or serange"))
@@ -1098,11 +1225,9 @@ @@ -1098,11 +1233,9 @@
if mask == "": if mask == "":
raise ValueError(_("Node Netmask is required")) raise ValueError(_("Node Netmask is required"))
@ -3824,7 +3827,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
raise ValueError(_("Unknown or missing protocol")) raise ValueError(_("Unknown or missing protocol"))
(rc, k) = semanage_node_key_create(self.sh, addr, mask, proto) (rc, k) = semanage_node_key_create(self.sh, addr, mask, proto)
@@ -1132,6 +1257,16 @@ @@ -1132,6 +1265,16 @@
self.__delete(addr, mask, proto) self.__delete(addr, mask, proto)
self.commit() self.commit()
@ -3841,7 +3844,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
def get_all(self, locallist = 0): def get_all(self, locallist = 0):
ddict = {} ddict = {}
if locallist : if locallist :
@@ -1145,15 +1280,20 @@ @@ -1145,15 +1288,20 @@
con = semanage_node_get_con(node) con = semanage_node_get_con(node)
addr = semanage_node_get_addr(self.sh, node) addr = semanage_node_get_addr(self.sh, node)
mask = semanage_node_get_mask(self.sh, node) mask = semanage_node_get_mask(self.sh, node)
@ -3867,7 +3870,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
def list(self, heading = 1, locallist = 0): def list(self, heading = 1, locallist = 0):
if heading: if heading:
print "%-18s %-18s %-5s %-5s\n" % ("IP Address", "Netmask", "Protocol", "Context") print "%-18s %-18s %-5s %-5s\n" % ("IP Address", "Netmask", "Protocol", "Context")
@@ -1193,7 +1333,8 @@ @@ -1193,7 +1341,8 @@
if rc < 0: if rc < 0:
raise ValueError(_("Could not check if interface %s is defined") % interface) raise ValueError(_("Could not check if interface %s is defined") % interface)
if exists: if exists:
@ -3877,7 +3880,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
(rc, iface) = semanage_iface_create(self.sh) (rc, iface) = semanage_iface_create(self.sh)
if rc < 0: if rc < 0:
@@ -1307,6 +1448,16 @@ @@ -1307,6 +1456,16 @@
self.__delete(interface) self.__delete(interface)
self.commit() self.commit()
@ -3894,7 +3897,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
def get_all(self, locallist = 0): def get_all(self, locallist = 0):
ddict = {} ddict = {}
if locallist: if locallist:
@@ -1322,6 +1473,15 @@ @@ -1322,6 +1481,15 @@
return ddict return ddict
@ -3910,7 +3913,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
def list(self, heading = 1, locallist = 0): def list(self, heading = 1, locallist = 0):
if heading: if heading:
print "%-30s %s\n" % (_("SELinux Interface"), _("Context")) print "%-30s %s\n" % (_("SELinux Interface"), _("Context"))
@@ -1338,6 +1498,48 @@ @@ -1338,6 +1506,48 @@
class fcontextRecords(semanageRecords): class fcontextRecords(semanageRecords):
def __init__(self, store = ""): def __init__(self, store = ""):
semanageRecords.__init__(self, store) semanageRecords.__init__(self, store)
@ -3959,7 +3962,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
def createcon(self, target, seuser = "system_u"): def createcon(self, target, seuser = "system_u"):
(rc, con) = semanage_context_create(self.sh) (rc, con) = semanage_context_create(self.sh)
@@ -1364,6 +1566,8 @@ @@ -1364,6 +1574,8 @@
def validate(self, target): def validate(self, target):
if target == "" or target.find("\n") >= 0: if target == "" or target.find("\n") >= 0:
raise ValueError(_("Invalid file specification")) raise ValueError(_("Invalid file specification"))
@ -3968,7 +3971,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
def __add(self, target, type, ftype = "", serange = "", seuser = "system_u"): def __add(self, target, type, ftype = "", serange = "", seuser = "system_u"):
self.validate(target) self.validate(target)
@@ -1388,7 +1592,8 @@ @@ -1388,7 +1600,8 @@
raise ValueError(_("Could not check if file context for %s is defined") % target) raise ValueError(_("Could not check if file context for %s is defined") % target)
if exists: if exists:
@ -3978,7 +3981,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
(rc, fcontext) = semanage_fcontext_create(self.sh) (rc, fcontext) = semanage_fcontext_create(self.sh)
if rc < 0: if rc < 0:
@@ -1504,9 +1709,16 @@ @@ -1504,9 +1717,16 @@
raise ValueError(_("Could not delete the file context %s") % target) raise ValueError(_("Could not delete the file context %s") % target)
semanage_fcontext_key_free(k) semanage_fcontext_key_free(k)
@ -3995,7 +3998,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
(rc,k) = semanage_fcontext_key_create(self.sh, target, file_types[ftype]) (rc,k) = semanage_fcontext_key_create(self.sh, target, file_types[ftype])
if rc < 0: if rc < 0:
raise ValueError(_("Could not create a key for %s") % target) raise ValueError(_("Could not create a key for %s") % target)
@@ -1561,12 +1773,22 @@ @@ -1561,12 +1781,22 @@
return ddict return ddict
@ -4020,7 +4023,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
for k in keys: for k in keys:
if fcon_dict[k]: if fcon_dict[k]:
if is_mls_enabled: if is_mls_enabled:
@@ -1575,6 +1797,12 @@ @@ -1575,6 +1805,12 @@
print "%-50s %-18s %s:%s:%s " % (k[0], k[1], fcon_dict[k][0], fcon_dict[k][1],fcon_dict[k][2]) print "%-50s %-18s %s:%s:%s " % (k[0], k[1], fcon_dict[k][0], fcon_dict[k][1],fcon_dict[k][2])
else: else:
print "%-50s %-18s <<None>>" % (k[0], k[1]) print "%-50s %-18s <<None>>" % (k[0], k[1])
@ -4033,7 +4036,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
class booleanRecords(semanageRecords): class booleanRecords(semanageRecords):
def __init__(self, store = ""): def __init__(self, store = ""):
@@ -1706,6 +1934,16 @@ @@ -1706,6 +1942,16 @@
else: else:
return _("unknown") return _("unknown")
@ -4050,7 +4053,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
def list(self, heading = True, locallist = False, use_file = False): def list(self, heading = True, locallist = False, use_file = False):
on_off = (_("off"), _("on")) on_off = (_("off"), _("on"))
if use_file: if use_file:
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/setfiles/restore.c policycoreutils-2.0.81/setfiles/restore.c diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/setfiles/restore.c policycoreutils-2.0.81/setfiles/restore.c
--- nsapolicycoreutils/setfiles/restore.c 2009-11-03 09:21:40.000000000 -0500 --- nsapolicycoreutils/setfiles/restore.c 2009-11-03 09:21:40.000000000 -0500
+++ policycoreutils-2.0.81/setfiles/restore.c 2010-03-22 14:05:56.000000000 -0400 +++ policycoreutils-2.0.81/setfiles/restore.c 2010-03-22 14:05:56.000000000 -0400
@@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
@ -4234,7 +4237,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+ free(buf); + free(buf);
+} +}
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/setfiles/restorecon.8 policycoreutils-2.0.81/setfiles/restorecon.8 diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/setfiles/restorecon.8 policycoreutils-2.0.81/setfiles/restorecon.8
--- nsapolicycoreutils/setfiles/restorecon.8 2008-08-28 09:34:24.000000000 -0400 --- nsapolicycoreutils/setfiles/restorecon.8 2008-08-28 09:34:24.000000000 -0400
+++ policycoreutils-2.0.81/setfiles/restorecon.8 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/setfiles/restorecon.8 2010-03-12 10:04:13.000000000 -0500
@@ -4,10 +4,10 @@ @@ -4,10 +4,10 @@
@ -4260,7 +4263,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
.TP .TP
.B \-v .B \-v
show changes in file labels. show changes in file labels.
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/setfiles/restore.h policycoreutils-2.0.81/setfiles/restore.h diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/setfiles/restore.h policycoreutils-2.0.81/setfiles/restore.h
--- nsapolicycoreutils/setfiles/restore.h 2009-11-03 09:21:40.000000000 -0500 --- nsapolicycoreutils/setfiles/restore.h 2009-11-03 09:21:40.000000000 -0500
+++ policycoreutils-2.0.81/setfiles/restore.h 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/setfiles/restore.h 2010-03-12 10:04:13.000000000 -0500
@@ -27,6 +27,7 @@ @@ -27,6 +27,7 @@
@ -4282,7 +4285,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
+void exclude_non_seclabel_mounts(); +void exclude_non_seclabel_mounts();
#endif #endif
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/setfiles/setfiles.8 policycoreutils-2.0.81/setfiles/setfiles.8 diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/setfiles/setfiles.8 policycoreutils-2.0.81/setfiles/setfiles.8
--- nsapolicycoreutils/setfiles/setfiles.8 2008-08-28 09:34:24.000000000 -0400 --- nsapolicycoreutils/setfiles/setfiles.8 2008-08-28 09:34:24.000000000 -0400
+++ policycoreutils-2.0.81/setfiles/setfiles.8 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/setfiles/setfiles.8 2010-03-12 10:04:13.000000000 -0500
@@ -31,6 +31,9 @@ @@ -31,6 +31,9 @@
@ -4295,7 +4298,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po
.TP .TP
.B \-q .B \-q
suppress non-error output. suppress non-error output.
diff --exclude-from=exclude --exclude=sepolgen-1.0.20 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/setfiles/setfiles.c policycoreutils-2.0.81/setfiles/setfiles.c diff --exclude-from=exclude --exclude=sepolgen-1.0.22 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/setfiles/setfiles.c policycoreutils-2.0.81/setfiles/setfiles.c
--- nsapolicycoreutils/setfiles/setfiles.c 2009-11-03 09:21:40.000000000 -0500 --- nsapolicycoreutils/setfiles/setfiles.c 2009-11-03 09:21:40.000000000 -0500
+++ policycoreutils-2.0.81/setfiles/setfiles.c 2010-03-12 10:04:13.000000000 -0500 +++ policycoreutils-2.0.81/setfiles/setfiles.c 2010-03-12 10:04:13.000000000 -0500
@@ -5,7 +5,6 @@ @@ -5,7 +5,6 @@

View File

@ -1,6 +1,6 @@
diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/access.py policycoreutils-2.0.81/sepolgen-1.0.20/src/sepolgen/access.py diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/access.py policycoreutils-2.0.82/sepolgen-1.0.23/src/sepolgen/access.py
--- nsasepolgen/src/sepolgen/access.py 2009-05-18 13:53:14.000000000 -0400 --- nsasepolgen/src/sepolgen/access.py 2010-03-22 14:08:29.000000000 -0400
+++ policycoreutils-2.0.81/sepolgen-1.0.20/src/sepolgen/access.py 2010-03-12 09:57:04.000000000 -0500 +++ policycoreutils-2.0.82/sepolgen-1.0.23/src/sepolgen/access.py 2010-03-24 16:11:37.000000000 -0400
@@ -32,6 +32,7 @@ @@ -32,6 +32,7 @@
""" """
@ -18,15 +18,6 @@ diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/access.py policyco
# The direction of the information flow represented by this # The direction of the information flow represented by this
# access vector - used for matching # access vector - used for matching
@@ -127,7 +130,7 @@
return self.to_string()
def to_string(self):
- return "allow %s %s : %s %s;" % (self.src_type, self.tgt_type,
+ return "allow %s %s:%s %s;" % (self.src_type, self.tgt_type,
self.obj_class, self.perms.to_space_str())
def __cmp__(self, other):
@@ -253,20 +256,22 @@ @@ -253,20 +256,22 @@
for av in l: for av in l:
self.add_av(AccessVector(av)) self.add_av(AccessVector(av))
@ -54,38 +45,10 @@ diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/access.py policyco
access.perms.update(perms) access.perms.update(perms)
if audit_msg: if audit_msg:
diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/audit.py policycoreutils-2.0.81/sepolgen-1.0.20/src/sepolgen/audit.py diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/audit.py policycoreutils-2.0.82/sepolgen-1.0.23/src/sepolgen/audit.py
--- nsasepolgen/src/sepolgen/audit.py 2009-12-01 15:46:50.000000000 -0500 --- nsasepolgen/src/sepolgen/audit.py 2010-03-22 14:08:29.000000000 -0400
+++ policycoreutils-2.0.81/sepolgen-1.0.20/src/sepolgen/audit.py 2010-03-12 09:59:05.000000000 -0500 +++ policycoreutils-2.0.82/sepolgen-1.0.23/src/sepolgen/audit.py 2010-03-24 16:11:37.000000000 -0400
@@ -23,6 +23,27 @@ @@ -68,6 +68,17 @@
# Convenience functions
+def get_audit_boot_msgs():
+ """Obtain all of the avc and policy load messages from the audit
+ log. This function uses ausearch and requires that the current
+ process have sufficient rights to run ausearch.
+
+ Returns:
+ string contain all of the audit messages returned by ausearch.
+ """
+ import subprocess
+ import time
+ fd=open("/proc/uptime", "r")
+ off=float(fd.read().split()[0])
+ fd.close
+ s = time.localtime(time.time() - off)
+ date = time.strftime("%D/%Y", s).split("/")
+ bootdate="%s/%s/%s" % (date[0], date[1], date[3])
+ boottime = time.strftime("%X", s)
+ output = subprocess.Popen(["/sbin/ausearch", "-m", "AVC,USER_AVC,MAC_POLICY_LOAD,DAEMON_START,SELINUX_ERR", "-ts", bootdate, boottime],
+ stdout=subprocess.PIPE).communicate()[0]
+ return output
+
def get_audit_msgs():
"""Obtain all of the avc and policy load messages from the audit
log. This function uses ausearch and requires that the current
@@ -47,6 +68,17 @@
stdout=subprocess.PIPE).communicate()[0] stdout=subprocess.PIPE).communicate()[0]
return output return output
@ -103,7 +66,7 @@ diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/audit.py policycor
# Classes representing audit messages # Classes representing audit messages
class AuditMessage: class AuditMessage:
@@ -106,6 +138,9 @@ @@ -127,6 +138,9 @@
if fields[0] == "path": if fields[0] == "path":
self.path = fields[1][1:-1] self.path = fields[1][1:-1]
return return
@ -113,7 +76,7 @@ diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/audit.py policycor
class AVCMessage(AuditMessage): class AVCMessage(AuditMessage):
"""AVC message representing an access denial or granted message. """AVC message representing an access denial or granted message.
@@ -146,6 +181,8 @@ @@ -167,6 +181,8 @@
self.path = "" self.path = ""
self.accesses = [] self.accesses = []
self.denial = True self.denial = True
@ -122,7 +85,7 @@ diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/audit.py policycor
def __parse_access(self, recs, start): def __parse_access(self, recs, start):
# This is kind of sucky - the access that is in a space separated # This is kind of sucky - the access that is in a space separated
@@ -205,7 +242,31 @@ @@ -226,7 +242,31 @@
if not found_src or not found_tgt or not found_class or not found_access: 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) raise ValueError("AVC message in invalid format [%s]\n" % self.message)
@ -138,7 +101,7 @@ diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/audit.py policycor
+ else: + else:
+ self.type, self.bools = audit2why.analyze(scontext, tcontext, self.tclass, self.accesses); + self.type, self.bools = audit2why.analyze(scontext, tcontext, self.tclass, self.accesses);
+ if self.type == audit2why.NOPOLICY: + if self.type == audit2why.NOPOLICY:
+ raise ValueError("Must call policy_init first") + self.type = audit2why.TERULE
+ if self.type == audit2why.BADTCON: + if self.type == audit2why.BADTCON:
+ raise ValueError("Invalid Target Context %s\n" % tcontext) + raise ValueError("Invalid Target Context %s\n" % tcontext)
+ if self.type == audit2why.BADSCON: + if self.type == audit2why.BADSCON:
@ -155,7 +118,7 @@ diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/audit.py policycor
class PolicyLoadMessage(AuditMessage): class PolicyLoadMessage(AuditMessage):
"""Audit message indicating that the policy was reloaded.""" """Audit message indicating that the policy was reloaded."""
def __init__(self, message): def __init__(self, message):
@@ -448,10 +509,10 @@ @@ -469,10 +509,10 @@
if avc_filter: if avc_filter:
if avc_filter.filter(avc): if avc_filter.filter(avc):
av_set.add(avc.scontext.type, avc.tcontext.type, avc.tclass, av_set.add(avc.scontext.type, avc.tcontext.type, avc.tclass,
@ -168,9 +131,9 @@ diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/audit.py policycor
return av_set return av_set
class AVCTypeFilter: class AVCTypeFilter:
diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/policygen.py policycoreutils-2.0.81/sepolgen-1.0.20/src/sepolgen/policygen.py diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/policygen.py policycoreutils-2.0.82/sepolgen-1.0.23/src/sepolgen/policygen.py
--- nsasepolgen/src/sepolgen/policygen.py 2010-03-12 09:34:56.000000000 -0500 --- nsasepolgen/src/sepolgen/policygen.py 2010-03-12 09:34:56.000000000 -0500
+++ policycoreutils-2.0.81/sepolgen-1.0.20/src/sepolgen/policygen.py 2010-03-12 09:53:30.000000000 -0500 +++ policycoreutils-2.0.82/sepolgen-1.0.23/src/sepolgen/policygen.py 2010-03-24 16:11:37.000000000 -0400
@@ -29,6 +29,8 @@ @@ -29,6 +29,8 @@
import access import access
import interfaces import interfaces
@ -188,7 +151,7 @@ diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/policygen.py polic
def set_gen_refpol(self, if_set=None, perm_maps=None): def set_gen_refpol(self, if_set=None, perm_maps=None):
"""Set whether reference policy interfaces are generated. """Set whether reference policy interfaces are generated.
@@ -151,8 +154,35 @@ @@ -151,8 +154,37 @@
rule = refpolicy.AVRule(av) rule = refpolicy.AVRule(av)
if self.dontaudit: if self.dontaudit:
rule.rule_type = rule.DONTAUDIT rule.rule_type = rule.DONTAUDIT
@ -207,6 +170,8 @@ diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/policygen.py polic
+ +
+ if av.type == audit2why.CONSTRAINT: + 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 += "#Contraint rule: "
+
+ if av.type == audit2why.TERULE: + if av.type == audit2why.TERULE:
+ if "write" in av.perms: + if "write" in av.perms:
+ if "dir" in av.obj_class or "open" in av.perms: + if "dir" in av.obj_class or "open" in av.perms:

View File

@ -2,12 +2,12 @@
%define libsepolver 2.0.41-3 %define libsepolver 2.0.41-3
%define libsemanagever 2.0.43-4 %define libsemanagever 2.0.43-4
%define libselinuxver 2.0.90-3 %define libselinuxver 2.0.90-3
%define sepolgenver 1.0.20 %define sepolgenver 1.0.23
Summary: SELinux policy core utilities Summary: SELinux policy core utilities
Name: policycoreutils Name: policycoreutils
Version: 2.0.81 Version: 2.0.82
Release: 3%{?dist} Release: 1%{?dist}
License: GPLv2+ License: GPLv2+
Group: System Environment/Base Group: System Environment/Base
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
@ -305,6 +305,17 @@ fi
exit 0 exit 0
%changelog %changelog
* Tue Mar 23 2010 Dan Walsh <dwalsh@redhat.com> 2.0.82-1
- Update to upstream
* Add avc's since boot from Dan Walsh.
* Fix unit tests from Dan Walsh.
* Tue Mar 23 2010 Dan Walsh <dwalsh@redhat.com> 2.0.81-4
- Update to upstream - sepolgen
* Add since-last-boot option to audit2allow from Dan Walsh.
* Fix sepolgen output to match what Chris expects for upstream
refpolicy from Dan Walsh.
* Mon Mar 22 2010 Dan Walsh <dwalsh@redhat.com> 2.0.81-3 * Mon Mar 22 2010 Dan Walsh <dwalsh@redhat.com> 2.0.81-3
- Allow restorecon on > 2 Gig files - Allow restorecon on > 2 Gig files

View File

@ -1,3 +1,3 @@
2ae1a9f7242e33413aae036d2edeb1d8 sepolgen-1.0.19.tgz e4deacb4df1e2ec081a91fd59da1dcc5 policycoreutils-2.0.82.tgz
64e37bf9a411c7c3993839155a30301c policycoreutils-2.0.81.tgz 49faa2e5f343317bcfcf34d7286f6037 sepolgen-1.0.23.tgz
59d33101d57378ce69889cc078addf90 policycoreutils_man_ru2.tar.bz2 59d33101d57378ce69889cc078addf90 policycoreutils_man_ru2.tar.bz2