*** empty log message ***

This commit is contained in:
Daniel J Walsh 2007-11-05 21:30:56 +00:00
parent f73ca01a5e
commit 7c2e75773b
2 changed files with 255 additions and 249 deletions

View File

@ -1,7 +1,7 @@
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/booleansPage.py policycoreutils-2.0.31/gui/booleansPage.py
--- nsapolicycoreutils/gui/booleansPage.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/booleansPage.py 2007-10-15 16:55:03.000000000 -0400
@@ -0,0 +1,254 @@
+++ policycoreutils-2.0.31/gui/booleansPage.py 2007-11-05 15:47:36.000000000 -0500
@@ -0,0 +1,230 @@
+#
+# booleansPage.py - GUI for Booleans page in system-config-securitylevel
+#
@ -30,6 +30,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/booleansPage.py poli
+import sys
+import tempfile
+import seobject
+import semanagePage
+
+INSTALLPATH='/usr/share/system-config-selinux'
+sys.path.append(INSTALLPATH)
@ -58,44 +59,6 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/booleansPage.py poli
+
+from glob import fnmatch
+
+class Translation:
+ def __init__(self):
+ self.translation={}
+ fd=open(INSTALLPATH + "/selinux.tbl","r")
+ lines=fd.readlines()
+ fd.close()
+ for i in lines:
+ try:
+ line=i.strip().split("_(\"")
+ key=line[0].strip()
+ category=line[1].split("\"")[0]
+ value=line[2].split("\"")[0]
+ self.translation[key]=(category,value)
+ except:
+ continue
+
+ def match(self,key, filter=""):
+ try:
+ f=filter.lower()
+ val=self.get_value(key).lower()
+ k=key.lower()
+ return val.find(f) >= 0 or k.find(f) >= 0
+ except:
+ return False
+
+ def get_category(self,key):
+ try:
+ return _(self.translation[key][0])
+ except:
+ #print key, "missing translation"
+ return _("Other")
+
+ def get_value(self,key):
+ try:
+ return _(self.translation[key][1])
+ except:
+ return key
+
+class Modifier:
+ def __init__(self,name, on, save):
+ self.on=on
@ -113,56 +76,22 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/booleansPage.py poli
+ def __init__(self,name, val, save=False):
+ Modifier.__init__(self,name, val, save)
+
+class Modifiers:
+ def __init__(self,store):
+ self.modifiers={}
+ self.translation=Translation()
+ self.store=store
+ self.store.clear()
+
+ def add(self,name,val):
+ if name == "targeted_policy":
+ return
+ category=self.translation.get_category(name)
+ if not self.modifiers.has_key(category):
+ self.modifiers[category]={}
+ iter=self.store.append(None)
+ self.modifiers[category]["iter"] = iter
+ self.store.set_value(iter, 1, category)
+ self.store.set_value(iter, 3, False)
+
+ self.modifiers[category][name]=val;
+ iter=self.store.append(self.modifiers[category]["iter"])
+ self.store.set_value(iter, 0, val.isOn())
+ self.store.set_value(iter, 1, self.translation.get_value(name))
+ self.store.set_value(iter, 2, name)
+ self.store.set_value(iter, 3, True)
+
+ def set(self,name,val):
+ category=self.translation.get_category(name)
+ self.modifiers[category][name].set(val)
+
+ def isBoolean(self,name):
+ c=self.translation.get_category(name)
+ return isinstance(self.modifiers[c][name], Boolean)
+
+ def get_booleans(self):
+ booleans={}
+ for c in self.modifiers.keys():
+ for n in self.modifiers[c].keys():
+ if isinstance(self.modifiers[c][n], Boolean):
+ booleans[n]=self.modifiers[c][n]
+ return booleans
+ACTIVE = 0
+MODULE = 1
+DESC = 2
+BOOLEAN = 3
+
+class booleansPage:
+ def __init__(self, xml, doDebug=None):
+ self.xml = xml
+ self.window = self.xml.get_widget("mainWindow").get_root_window()
+ self.local = False
+ self.types=[]
+ self.selinuxsupport = True
+ self.translation = Translation()
+ self.typechanged = False
+ self.doDebug = doDebug
+ self.busy_cursor = gtk.gdk.Cursor(gtk.gdk.WATCH)
+ self.ready_cursor = gtk.gdk.Cursor(gtk.gdk.LEFT_PTR)
+
+ # Bring in widgets from glade file.
+ self.typeHBox = xml.get_widget("typeHBox")
@ -180,30 +109,65 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/booleansPage.py poli
+ listStore = gtk.ListStore(gobject.TYPE_STRING)
+ cell = gtk.CellRendererText()
+
+ self.booleansStore = gtk.TreeStore(gobject.TYPE_BOOLEAN, gobject.TYPE_STRING, gobject.TYPE_PYOBJECT, gobject.TYPE_BOOLEAN)
+ self.booleansStore.set_sort_column_id(1, gtk.SORT_ASCENDING)
+ self.booleansView.set_model(self.booleansStore)
+ self.store = gtk.ListStore(gobject.TYPE_BOOLEAN, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING)
+ self.store.set_sort_column_id(1, gtk.SORT_ASCENDING)
+ self.booleansView.set_model(self.store)
+
+ checkbox = gtk.CellRendererToggle()
+ checkbox.connect("toggled", self.boolean_toggled)
+ col = gtk.TreeViewColumn('', checkbox, active = 0,visible=3)
+ col.set_fixed_width(20)
+ col = gtk.TreeViewColumn('Active', checkbox, active = ACTIVE)
+ col.set_clickable(True)
+ col.set_sort_column_id(ACTIVE)
+ self.booleansView.append_column(col)
+
+ col = gtk.TreeViewColumn("", gtk.CellRendererText(), text=1)
+ col = gtk.TreeViewColumn("Module", gtk.CellRendererText(), text=MODULE)
+ col.set_sort_column_id(MODULE)
+ col.set_resizable(True)
+ self.booleansView.append_column(col)
+
+ col = gtk.TreeViewColumn("Description", gtk.CellRendererText(), text=DESC)
+ col.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
+ col.set_fixed_width(400)
+ col.set_sort_column_id(DESC)
+ col.set_resizable(True)
+ self.booleansView.append_column(col)
+
+ col = gtk.TreeViewColumn("Name", gtk.CellRendererText(), text=BOOLEAN)
+ col.set_sort_column_id(BOOLEAN)
+ col.set_resizable(True)
+ self.booleansView.set_search_equal_func(self.__search)
+ self.booleansView.append_column(col)
+ self.filter=""
+ self.load(self.filter)
+
+ def __search(self, model, col, key, i):
+ sort_col = self.store.get_sort_column_id()[0]
+ if sort_col > 0:
+ val = model.get_value(i, sort_col)
+ if val.lower().startswith(key.lower()):
+ return False
+ return True
+
+ def wait(self):
+ self.window.set_cursor(self.busy_cursor)
+ semanagePage.idle_func()
+
+ def ready(self):
+ self.window.set_cursor(self.ready_cursor)
+ semanagePage.idle_func()
+
+ def deleteDialog(self):
+ store, iter = self.booleansView.get_selection().get_selected()
+ boolean = store.get_value(iter, 2)
+ boolean = store.get_value(iter, BOOLEAN)
+ # change cursor
+ if boolean == None:
+ return
+ try:
+ self.wait()
+ self.booleansView.get_root_window().set_cursor(cursor)
+ (rc, out) = commands.getstatusoutput("semanage boolean -d %s" % boolean)
+
+ self.ready()
+ if rc != 0:
+ return self.error(out)
+ self.load(self.filter)
@ -222,27 +186,39 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/booleansPage.py poli
+ def get_description(self):
+ return _("Boolean")
+
+ def match(self,key, filter=""):
+ try:
+ f=filter.lower()
+ cat=self.booleans.get_category(key).lower()
+ val=self.booleans.get_desc(key).lower()
+ k=key.lower()
+ return val.find(f) >= 0 or k.find(f) >= 0 or cat.find(f) >= 0
+ except:
+ return False
+
+
+ def load(self, filter=None):
+ self.modifiers=Modifiers(self.booleansStore)
+ booleans=seobject.booleanRecords()
+ booleansList=booleans.get_all(self.local)
+# booleansList=commands.getoutput("/usr/sbin/getsebool -a").split("\n")
+ self.store.clear()
+ self.booleans = seobject.booleanRecords()
+ booleansList = self.booleans.get_all(self.local)
+ for name in booleansList:
+ rec=booleansList[name]
+ if self.translation.match(name, filter):
+ self.modifiers.add(name,Boolean(name,rec[2] == 1))
+ rec = booleansList[name]
+ if self.match(name, filter):
+ iter=self.store.append()
+ self.store.set_value(iter, ACTIVE, rec[2] == 1)
+ self.store.set_value(iter, MODULE, self.booleans.get_category(name))
+ self.store.set_value(iter, DESC, self.booleans.get_desc(name))
+ self.store.set_value(iter, BOOLEAN, name)
+
+ def boolean_toggled(self, widget, row):
+ if len(row) == 1:
+ return
+ iter = self.booleansStore.get_iter(row)
+ val = self.booleansStore.get_value(iter, 0)
+ key = self.booleansStore.get_value(iter, 2)
+ self.booleansStore.set_value(iter, 0 , not val)
+ self.modifiers.set(key, not val)
+
+ iter = self.store.get_iter(row)
+ val = self.store.get_value(iter, ACTIVE)
+ key = self.store.get_value(iter, BOOLEAN)
+ self.store.set_value(iter, ACTIVE , not val)
+ self.wait()
+ setsebool="/usr/sbin/setsebool -P %s=%d" % (key, not val)
+ commands.getstatusoutput(setsebool)
+ self.ready()
+
+ def on_local_clicked(self, button):
+ self.local = not self.local
@ -258,8 +234,8 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/booleansPage.py poli
+
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/fcontextPage.py policycoreutils-2.0.31/gui/fcontextPage.py
--- nsapolicycoreutils/gui/fcontextPage.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/fcontextPage.py 2007-10-15 16:55:03.000000000 -0400
@@ -0,0 +1,209 @@
+++ policycoreutils-2.0.31/gui/fcontextPage.py 2007-11-05 16:29:06.000000000 -0500
@@ -0,0 +1,217 @@
+## fcontextPage.py - show selinux mappings
+## Copyright (C) 2006 Red Hat, Inc.
+
@ -294,11 +270,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/fcontextPage.py poli
+ def __init__(self, scontext):
+ self.scontext = scontext
+ con=scontext.split(":")
+ self.user = con[0]
+ self.role = con[1]
+ self.type = con[2]
+ if len(con) > 3:
+ self.mls = con[3]
+ self.type = con[0]
+ if len(con) > 1:
+ self.mls = con[1]
+ else:
+ self.mls = "s0"
+
@ -322,16 +296,18 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/fcontextPage.py poli
+ import __builtin__
+ __builtin__.__dict__['_'] = unicode
+
+
+class fcontextPage(semanagePage):
+ def __init__(self, xml):
+ semanagePage.__init__(self, xml, "fcontext", _("File Labeling"))
+ self.fcontextFilter = xml.get_widget("fcontextFilterEntry")
+ self.fcontextFilter.connect("focus_out_event", self.filter_changed)
+ self.fcontextFilter.connect("activate", self.filter_changed)
+ self.view = xml.get_widget("fcontextView")
+
+ self.store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING)
+ self.view = xml.get_widget("fcontextView")
+ self.view.set_model(self.store)
+# self.store.set_sort_column_id(0, gtk.SORT_ASCENDING)
+ self.view.set_search_equal_func(self.search)
+
+ col = gtk.TreeViewColumn(_("File\nSpecification"), gtk.CellRendererText(), text=SPEC_COL)
+ col.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
@ -340,7 +316,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/fcontextPage.py poli
+ col.set_sort_column_id(SPEC_COL)
+ col.set_resizable(True)
+ self.view.append_column(col)
+ col = gtk.TreeViewColumn(_("Selinux\nFile Context"), gtk.CellRendererText(), text=TYPE_COL)
+ col = gtk.TreeViewColumn(_("Selinux\nFile Type"), gtk.CellRendererText(), text=TYPE_COL)
+
+ col.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
+ col.set_fixed_width(250)
@ -351,6 +327,8 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/fcontextPage.py poli
+ col.set_sort_column_id(FTYPE_COL)
+ col.set_resizable(True)
+ self.view.append_column(col)
+
+ self.store.set_sort_column_id(SPEC_COL, gtk.SORT_ASCENDING)
+ self.load()
+ self.fcontextEntry = xml.get_widget("fcontextEntry")
+ self.fcontextFileTypeCombo = xml.get_widget("fcontextFileTypeCombo")
@ -387,10 +365,10 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/fcontextPage.py poli
+ self.store.set_value(iter, SPEC_COL, fcon[0])
+ self.store.set_value(iter, FTYPE_COL, fcon[1])
+ if len(fcon) > 3:
+ rec="%s:%s:%s:%s " % (fcon[2], fcon[3],fcon[4], seobject.translate(fcon[5],False))
+ rec="%s:%s" % (fcon[4], seobject.translate(fcon[5],False))
+ else:
+ rec="<<None>>"
+ self.store.set_value(iter, 1, rec)
+ self.store.set_value(iter, TYPE_COL, rec)
+ self.view.get_selection().select_path ((0,))
+
+ def filter_changed(self, *arg):
@ -427,7 +405,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/fcontextPage.py poli
+ try:
+ fspec=store.get_value(iter, SPEC_COL)
+ ftype=store.get_value(iter, FTYPE_COL)
+ self.wait()
+ (rc, out) = commands.getstatusoutput("semanage fcontext -d -f '%s' %s" % (ftype, fspec))
+ self.ready()
+
+ if rc != 0:
+ return self.error(out)
@ -443,7 +423,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/fcontextPage.py poli
+ list_model=self.fcontextFileTypeCombo.get_model()
+ iter = self.fcontextFileTypeCombo.get_active_iter()
+ ftype=list_model.get_value(iter,0)
+ self.wait()
+ (rc, out) = commands.getstatusoutput("semanage fcontext -a -t %s -r %s -f '%s' %s" % (type, mls, ftype, fspec))
+ self.ready()
+ if rc != 0:
+ self.error(out)
+ return False
@ -451,7 +433,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/fcontextPage.py poli
+ iter=self.store.append()
+ self.store.set_value(iter, SPEC_COL, fspec)
+ self.store.set_value(iter, FTYPE_COL, ftype)
+ self.store.set_value(iter, TYPE_COL, "system_u:object_r:%s:%s" % (type, mls))
+ self.store.set_value(iter, TYPE_COL, "%s:%s" % (type, mls))
+
+ def modify(self):
+ fspec=self.fcontextEntry.get_text().strip()
@ -460,7 +442,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/fcontextPage.py poli
+ list_model=self.fcontextFileTypeCombo.get_model()
+ iter = self.fcontextFileTypeCombo.get_active_iter()
+ ftype=list_model.get_value(iter,0)
+ self.wait()
+ (rc, out) = commands.getstatusoutput("semanage fcontext -m -t %s -r %s -f '%s' %s" % (type, mls, ftype, fspec))
+ self.ready()
+ if rc != 0:
+ self.error(out)
+ return False
@ -468,11 +452,11 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/fcontextPage.py poli
+ store, iter = self.view.get_selection().get_selected()
+ self.store.set_value(iter, SPEC_COL, fspec)
+ self.store.set_value(iter, FTYPE_COL, ftype)
+ self.store.set_value(iter, TYPE_COL, "system_u:object_r:%s:%s" % (type, mls))
+ self.store.set_value(iter, TYPE_COL, "%s:%s" % (type, mls))
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/loginsPage.py policycoreutils-2.0.31/gui/loginsPage.py
--- nsapolicycoreutils/gui/loginsPage.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/loginsPage.py 2007-10-15 16:55:03.000000000 -0400
@@ -0,0 +1,179 @@
+++ policycoreutils-2.0.31/gui/loginsPage.py 2007-11-05 15:48:06.000000000 -0500
@@ -0,0 +1,185 @@
+## loginsPage.py - show selinux mappings
+## Copyright (C) 2006 Red Hat, Inc.
+
@ -607,7 +591,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/loginsPage.py policy
+ if login == "root" or login == "__default__":
+ raise ValueError(_("Login '%s' is required") % login)
+
+ self.wait()
+ (rc, out) = commands.getstatusoutput("semanage login -d %s" % login)
+ self.ready()
+ if rc != 0:
+ self.error(out)
+ return False
@ -624,7 +610,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/loginsPage.py policy
+ list_model=self.loginsSelinuxUserCombo.get_model()
+ iter = self.loginsSelinuxUserCombo.get_active_iter()
+ seuser = list_model.get_value(iter,0)
+ self.wait()
+ (rc, out) = commands.getstatusoutput("semanage login -a -s %s -r %s %s" % (seuser, serange, target))
+ self.ready()
+ if rc != 0:
+ self.error(out)
+ return False
@ -642,7 +630,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/loginsPage.py policy
+ list_model = self.loginsSelinuxUserCombo.get_model()
+ iter = self.loginsSelinuxUserCombo.get_active_iter()
+ seuser=list_model.get_value(iter,0)
+ self.wait()
+ (rc, out) = commands.getstatusoutput("semanage login -m -s %s -r %s %s" % (seuser, serange, target))
+ self.ready()
+ if rc != 0:
+ self.error(out)
+ return False
@ -654,7 +644,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/loginsPage.py policy
+
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/Makefile policycoreutils-2.0.31/gui/Makefile
--- nsapolicycoreutils/gui/Makefile 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/Makefile 2007-10-15 16:55:03.000000000 -0400
+++ policycoreutils-2.0.31/gui/Makefile 2007-11-02 15:54:42.000000000 -0400
@@ -0,0 +1,34 @@
+# Installation directories.
+PREFIX ?= ${DESTDIR}/usr
@ -692,7 +682,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/Makefile policycoreu
+relabel:
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/mappingsPage.py policycoreutils-2.0.31/gui/mappingsPage.py
--- nsapolicycoreutils/gui/mappingsPage.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/mappingsPage.py 2007-10-15 16:55:03.000000000 -0400
+++ policycoreutils-2.0.31/gui/mappingsPage.py 2007-11-02 15:54:42.000000000 -0400
@@ -0,0 +1,56 @@
+## mappingsPage.py - show selinux mappings
+## Copyright (C) 2006 Red Hat, Inc.
@ -752,8 +742,8 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/mappingsPage.py poli
+
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/modulesPage.py policycoreutils-2.0.31/gui/modulesPage.py
--- nsapolicycoreutils/gui/modulesPage.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/modulesPage.py 2007-10-16 23:32:51.000000000 -0400
@@ -0,0 +1,187 @@
+++ policycoreutils-2.0.31/gui/modulesPage.py 2007-11-05 15:48:46.000000000 -0500
@@ -0,0 +1,195 @@
+## modulesPage.py - show selinux mappings
+## Copyright (C) 2006 Red Hat, Inc.
+
@ -869,7 +859,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/modulesPage.py polic
+ store, iter = self.view.get_selection().get_selected()
+ module = store.get_value(iter, 0)
+ try:
+ self.wait()
+ status, output = commands.getstatusoutput("semodule -r %s" % module)
+ self.ready()
+ if status != 0:
+ self.error(output)
+ else:
@ -882,12 +874,14 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/modulesPage.py polic
+ def enable_audit(self, button):
+ self.audit_enabled = not self.audit_enabled
+ try:
+ self.wait()
+ if self.audit_enabled:
+ status, output =commands.getstatusoutput("semodule -DB")
+ button.set_label(_("Disable Audit"))
+ else:
+ status, output =commands.getstatusoutput("semodule -B")
+ button.set_label(_("Enable Audit"))
+ self.ready()
+
+ if status != 0:
+ self.error(output)
@ -897,7 +891,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/modulesPage.py polic
+
+ def disable_audit(self, button):
+ try:
+ self.wait()
+ status, output =commands.getstatusoutput("semodule -B")
+ self.ready()
+ if status != 0:
+ self.error(output)
+
@ -928,7 +924,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/modulesPage.py polic
+
+ def add(self, file):
+ try:
+ self.wait()
+ status, output =commands.getstatusoutput("semodule -i %s" % file)
+ self.ready()
+ if status != 0:
+ self.error(output)
+ else:
@ -943,7 +941,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/modulesPage.py polic
+
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.glade policycoreutils-2.0.31/gui/polgen.glade
--- nsapolicycoreutils/gui/polgen.glade 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/polgen.glade 2007-10-16 21:32:19.000000000 -0400
+++ policycoreutils-2.0.31/gui/polgen.glade 2007-11-02 15:54:42.000000000 -0400
@@ -0,0 +1,3012 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
@ -3959,7 +3957,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.glade policyc
+</glade-interface>
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgengui.py policycoreutils-2.0.31/gui/polgengui.py
--- nsapolicycoreutils/gui/polgengui.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/polgengui.py 2007-10-16 21:32:31.000000000 -0400
+++ policycoreutils-2.0.31/gui/polgengui.py 2007-11-02 15:54:42.000000000 -0400
@@ -0,0 +1,590 @@
+#!/usr/bin/python -E
+#
@ -4553,7 +4551,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgengui.py policyc
+ app.stand_alone()
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.py policycoreutils-2.0.31/gui/polgen.py
--- nsapolicycoreutils/gui/polgen.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/polgen.py 2007-10-18 17:47:11.000000000 -0400
+++ policycoreutils-2.0.31/gui/polgen.py 2007-11-02 15:54:42.000000000 -0400
@@ -0,0 +1,831 @@
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
@ -5388,8 +5386,8 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.py policycore
+
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/portsPage.py policycoreutils-2.0.31/gui/portsPage.py
--- nsapolicycoreutils/gui/portsPage.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/portsPage.py 2007-10-15 16:55:03.000000000 -0400
@@ -0,0 +1,251 @@
+++ policycoreutils-2.0.31/gui/portsPage.py 2007-11-05 15:47:42.000000000 -0500
@@ -0,0 +1,258 @@
+## portsPage.py - show selinux mappings
+## Copyright (C) 2006 Red Hat, Inc.
+
@ -5473,6 +5471,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/portsPage.py policyc
+ self.view.set_model(self.store)
+ self.store.set_sort_column_id(0, gtk.SORT_ASCENDING)
+
+ self.view.set_search_equal_func(self.search)
+ col = gtk.TreeViewColumn(_("SELinux Port\nType"), gtk.CellRendererText(), text = TYPE_COL)
+ col.set_sort_column_id(TYPE_COL)
+ col.set_resizable(True)
@ -5497,8 +5496,8 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/portsPage.py policyc
+
+ def sort_int(self, treemodel, iter1, iter2, user_data):
+ try:
+ p1 = int(treemodel.get_value(iter1,2))
+ p2 = int(treemodel.get_value(iter2,2))
+ p1 = int(treemodel.get_value(iter1,PORT_COL))
+ p2 = int(treemodel.get_value(iter2,PORT_COL))
+ if p1 > p2:
+ return 1
+ if p1 == p2:
@ -5577,7 +5576,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/portsPage.py policyc
+ port = store.get_value(iter, PORT_COL)
+ protocol = store.get_value(iter, 1)
+ try:
+ self.wait()
+ (rc, out) = commands.getstatusoutput("semanage port -d -p %s %s" % (protocol, port))
+ self.ready()
+ if rc != 0:
+ return self.error(out)
+ store.remove(iter)
@ -5597,7 +5598,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/portsPage.py policyc
+ list_model = self.ports_protocol_combo.get_model()
+ iter = self.ports_protocol_combo.get_active_iter()
+ protocol = list_model.get_value(iter,0)
+ self.wait()
+ (rc, out) = commands.getstatusoutput("semanage port -a -p %s -r %s -t %s %s" % (protocol, mls, target, port_number))
+ self.ready()
+ if rc != 0:
+ self.error(out)
+ return False
@ -5615,7 +5618,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/portsPage.py policyc
+ list_model = self.ports_protocol_combo.get_model()
+ iter = self.ports_protocol_combo.get_active_iter()
+ protocol = list_model.get_value(iter,0)
+ self.wait()
+ (rc, out) = commands.getstatusoutput("semanage port -m -p %s -r %s -t %s %s" % (protocol, mls, target, port_number))
+ self.ready()
+ if rc != 0:
+ self.error(out)
+ return False
@ -5643,7 +5648,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/portsPage.py policyc
+
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/selinux.tbl policycoreutils-2.0.31/gui/selinux.tbl
--- nsapolicycoreutils/gui/selinux.tbl 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/selinux.tbl 2007-10-15 16:55:03.000000000 -0400
+++ policycoreutils-2.0.31/gui/selinux.tbl 2007-11-02 15:54:42.000000000 -0400
@@ -0,0 +1,295 @@
+! allow_console_login _("Login") _("Allow direct login to the console device. Required for System 390")
+acct_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for acct daemon")
@ -5942,8 +5947,8 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/selinux.tbl policyco
+
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/semanagePage.py policycoreutils-2.0.31/gui/semanagePage.py
--- nsapolicycoreutils/gui/semanagePage.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/semanagePage.py 2007-10-15 16:55:03.000000000 -0400
@@ -0,0 +1,147 @@
+++ policycoreutils-2.0.31/gui/semanagePage.py 2007-11-05 15:48:10.000000000 -0500
@@ -0,0 +1,170 @@
+## semanagePage.py - show selinux mappings
+## Copyright (C) 2006 Red Hat, Inc.
+
@ -5986,9 +5991,17 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/semanagePage.py poli
+ import __builtin__
+ __builtin__.__dict__['_'] = unicode
+
+def idle_func():
+ while gtk.events_pending():
+ gtk.main_iteration()
+
+class semanagePage:
+ def __init__(self, xml, name, description):
+ self.xml = xml
+ self.window = self.xml.get_widget("mainWindow").get_root_window()
+ self.busy_cursor = gtk.gdk.Cursor(gtk.gdk.WATCH)
+ self.ready_cursor = gtk.gdk.Cursor(gtk.gdk.LEFT_PTR)
+
+ self.local = False
+ self.view = xml.get_widget("%sView" % name)
+ self.dialog = xml.get_widget("%sDialog" % name)
@ -6000,6 +6013,14 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/semanagePage.py poli
+ self.view.get_selection().connect("changed", self.itemSelected)
+ self.description = description;
+
+ def wait(self):
+ self.window.set_cursor(self.busy_cursor)
+ idle_func()
+
+ def ready(self):
+ self.window.set_cursor(self.ready_cursor)
+ idle_func()
+
+ def get_description(self):
+ return self.description
+
@ -6011,6 +6032,13 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/semanagePage.py poli
+ if filter != self.filter:
+ self.load(filter)
+
+ def search(self, model, col, key, i):
+ sort_col = self.store.get_sort_column_id()[0]
+ val = model.get_value(i,sort_col)
+ if val.lower().startswith(key.lower()):
+ return False
+ return True
+
+ def match(self, target, filter):
+ try:
+ f=filter.lower()
@ -6093,7 +6121,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/semanagePage.py poli
+
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/statusPage.py policycoreutils-2.0.31/gui/statusPage.py
--- nsapolicycoreutils/gui/statusPage.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/statusPage.py 2007-10-15 16:55:03.000000000 -0400
+++ policycoreutils-2.0.31/gui/statusPage.py 2007-11-02 15:54:42.000000000 -0400
@@ -0,0 +1,219 @@
+## statusPage.py - show selinux status
+## Copyright (C) 2006 Red Hat, Inc.
@ -6316,8 +6344,8 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/statusPage.py policy
+
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinux.glade policycoreutils-2.0.31/gui/system-config-selinux.glade
--- nsapolicycoreutils/gui/system-config-selinux.glade 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/system-config-selinux.glade 2007-10-16 23:32:02.000000000 -0400
@@ -0,0 +1,3321 @@
+++ policycoreutils-2.0.31/gui/system-config-selinux.glade 2007-11-05 16:28:49.000000000 -0500
@@ -0,0 +1,3290 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
@ -8315,7 +8343,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinu
+ <widget class="GtkTreeView" id="booleansView">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</property>
+ <property name="headers_visible">True</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
@ -8449,105 +8477,74 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinu
+ </child>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow17">
+ <widget class="GtkHBox" id="hbox14">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+ <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkViewport" id="viewport1">
+ <widget class="GtkLabel" id="label58">
+ <property name="visible">True</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox19">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox8">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label52">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Filter</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">10</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="fcontextFilterEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">•</property>
+ <property name="activates_default">False</property>
+ <signal name="changed" handler="on_booleansFilter_changed" last_modification_time="Fri, 06 Apr 2007 12:39:26 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">5</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkTreeView" id="fcontextView">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">True</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ <property name="fixed_height_mode">False</property>
+ <property name="hover_selection">False</property>
+ <property name="hover_expand">False</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <property name="label" translatable="yes">Filter</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">10</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="fcontextFilterEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">•</property>
+ <property name="activates_default">False</property>
+ <signal name="changed" handler="on_fcontextFilter_changed" last_modification_time="Mon, 05 Nov 2007 21:22:11 GMT"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkTreeView" id="fcontextView">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">True</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ <property name="fixed_height_mode">False</property>
+ <property name="hover_selection">False</property>
+ <property name="hover_expand">False</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
@ -9641,7 +9638,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinu
+</glade-interface>
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinux.py policycoreutils-2.0.31/gui/system-config-selinux.py
--- nsapolicycoreutils/gui/system-config-selinux.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/system-config-selinux.py 2007-10-15 16:55:03.000000000 -0400
+++ policycoreutils-2.0.31/gui/system-config-selinux.py 2007-11-02 15:54:42.000000000 -0400
@@ -0,0 +1,175 @@
+#!/usr/bin/python
+#
@ -9820,7 +9817,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinu
+ app.stand_alone()
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/boolean.py policycoreutils-2.0.31/gui/templates/boolean.py
--- nsapolicycoreutils/gui/templates/boolean.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/templates/boolean.py 2007-10-18 17:46:44.000000000 -0400
+++ policycoreutils-2.0.31/gui/templates/boolean.py 2007-11-02 15:54:42.000000000 -0400
@@ -0,0 +1,40 @@
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
@ -9864,7 +9861,7 @@ 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.31/gui/templates/etc_rw.py
--- nsapolicycoreutils/gui/templates/etc_rw.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/templates/etc_rw.py 2007-10-18 17:46:44.000000000 -0400
+++ policycoreutils-2.0.31/gui/templates/etc_rw.py 2007-11-02 15:54:42.000000000 -0400
@@ -0,0 +1,129 @@
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
@ -9997,7 +9994,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/etc_rw.py
+"""
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/executable.py policycoreutils-2.0.31/gui/templates/executable.py
--- nsapolicycoreutils/gui/templates/executable.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/templates/executable.py 2007-10-18 17:46:44.000000000 -0400
+++ policycoreutils-2.0.31/gui/templates/executable.py 2007-11-02 15:54:42.000000000 -0400
@@ -0,0 +1,331 @@
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
@ -10332,7 +10329,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/executable
+
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/__init__.py policycoreutils-2.0.31/gui/templates/__init__.py
--- nsapolicycoreutils/gui/templates/__init__.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/templates/__init__.py 2007-10-18 17:46:44.000000000 -0400
+++ policycoreutils-2.0.31/gui/templates/__init__.py 2007-11-02 15:54:42.000000000 -0400
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2007 Red Hat, Inc.
@ -10354,7 +10351,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/__init__.p
+
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/network.py policycoreutils-2.0.31/gui/templates/network.py
--- nsapolicycoreutils/gui/templates/network.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/templates/network.py 2007-10-18 17:46:44.000000000 -0400
+++ policycoreutils-2.0.31/gui/templates/network.py 2007-11-02 15:54:42.000000000 -0400
@@ -0,0 +1,80 @@
+te_port_types="""
+type TEMPLATETYPE_port_t;
@ -10438,7 +10435,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/network.py
+
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/rw.py policycoreutils-2.0.31/gui/templates/rw.py
--- nsapolicycoreutils/gui/templates/rw.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/templates/rw.py 2007-10-18 17:46:44.000000000 -0400
+++ policycoreutils-2.0.31/gui/templates/rw.py 2007-11-02 15:54:42.000000000 -0400
@@ -0,0 +1,128 @@
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
@ -10570,7 +10567,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/rw.py poli
+"""
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/script.py policycoreutils-2.0.31/gui/templates/script.py
--- nsapolicycoreutils/gui/templates/script.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/templates/script.py 2007-10-18 17:46:44.000000000 -0400
+++ policycoreutils-2.0.31/gui/templates/script.py 2007-11-02 15:54:42.000000000 -0400
@@ -0,0 +1,91 @@
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
@ -10665,7 +10662,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/script.py
+"""
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/semodule.py policycoreutils-2.0.31/gui/templates/semodule.py
--- nsapolicycoreutils/gui/templates/semodule.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/templates/semodule.py 2007-10-18 17:46:44.000000000 -0400
+++ policycoreutils-2.0.31/gui/templates/semodule.py 2007-11-02 15:54:42.000000000 -0400
@@ -0,0 +1,41 @@
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
@ -10710,7 +10707,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/semodule.p
+
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/tmp.py policycoreutils-2.0.31/gui/templates/tmp.py
--- nsapolicycoreutils/gui/templates/tmp.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/templates/tmp.py 2007-10-18 17:46:44.000000000 -0400
+++ policycoreutils-2.0.31/gui/templates/tmp.py 2007-11-02 15:54:42.000000000 -0400
@@ -0,0 +1,97 @@
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
@ -10811,7 +10808,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/tmp.py pol
+
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/user.py policycoreutils-2.0.31/gui/templates/user.py
--- nsapolicycoreutils/gui/templates/user.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/templates/user.py 2007-10-18 17:46:44.000000000 -0400
+++ policycoreutils-2.0.31/gui/templates/user.py 2007-11-02 15:54:42.000000000 -0400
@@ -0,0 +1,137 @@
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
@ -10952,7 +10949,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/user.py po
+"""
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_lib.py policycoreutils-2.0.31/gui/templates/var_lib.py
--- nsapolicycoreutils/gui/templates/var_lib.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/templates/var_lib.py 2007-10-18 17:46:44.000000000 -0400
+++ policycoreutils-2.0.31/gui/templates/var_lib.py 2007-11-02 15:54:42.000000000 -0400
@@ -0,0 +1,162 @@
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
@ -11118,7 +11115,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_lib.py
+"""
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_log.py policycoreutils-2.0.31/gui/templates/var_log.py
--- nsapolicycoreutils/gui/templates/var_log.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/templates/var_log.py 2007-10-25 16:52:06.000000000 -0400
+++ policycoreutils-2.0.31/gui/templates/var_log.py 2007-11-02 15:54:42.000000000 -0400
@@ -0,0 +1,110 @@
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
@ -11232,7 +11229,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_log.py
+"""
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_run.py policycoreutils-2.0.31/gui/templates/var_run.py
--- nsapolicycoreutils/gui/templates/var_run.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/templates/var_run.py 2007-10-18 17:46:44.000000000 -0400
+++ policycoreutils-2.0.31/gui/templates/var_run.py 2007-11-02 15:54:42.000000000 -0400
@@ -0,0 +1,119 @@
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
@ -11355,7 +11352,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_run.py
+
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_spool.py policycoreutils-2.0.31/gui/templates/var_spool.py
--- nsapolicycoreutils/gui/templates/var_spool.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/templates/var_spool.py 2007-10-18 17:46:44.000000000 -0400
+++ policycoreutils-2.0.31/gui/templates/var_spool.py 2007-11-02 15:54:42.000000000 -0400
@@ -0,0 +1,131 @@
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
@ -11490,7 +11487,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_spool.
+"""
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/translationsPage.py policycoreutils-2.0.31/gui/translationsPage.py
--- nsapolicycoreutils/gui/translationsPage.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/translationsPage.py 2007-10-15 16:55:03.000000000 -0400
+++ policycoreutils-2.0.31/gui/translationsPage.py 2007-11-02 15:54:42.000000000 -0400
@@ -0,0 +1,118 @@
+## translationsPage.py - show selinux translations
+## Copyright (C) 2006 Red Hat, Inc.
@ -11612,8 +11609,8 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/translationsPage.py
+ self.store.set_value(iter, 1, translation)
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/usersPage.py policycoreutils-2.0.31/gui/usersPage.py
--- nsapolicycoreutils/gui/usersPage.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/usersPage.py 2007-10-15 16:55:03.000000000 -0400
@@ -0,0 +1,172 @@
+++ policycoreutils-2.0.31/gui/usersPage.py 2007-11-05 15:47:58.000000000 -0500
@@ -0,0 +1,178 @@
+## usersPage.py - show selinux mappings
+## Copyright (C) 2006 Red Hat, Inc.
+
@ -11739,7 +11736,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/usersPage.py policyc
+ range = self.mlsRangeEntry.get_text()
+ roles = self.selinuxRolesEntry.get_text()
+
+ self.wait()
+ (rc, out) = commands.getstatusoutput("semanage user -a -R '%s' -r %s-%s -P %s %s" % (roles, level, range, prefix, user))
+ self.ready()
+ if rc != 0:
+ self.error(out)
+ return False
@ -11757,7 +11756,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/usersPage.py policyc
+ range = self.mlsRangeEntry.get_text()
+ roles = self.selinuxRolesEntry.get_text()
+
+ self.wait()
+ (rc, out) = commands.getstatusoutput("semanage user -m -R '%s' -r %s-%s -P %s %s" % (roles, level, range, prefix, user))
+ self.ready()
+
+ if rc != 0:
+ self.error(out)
@ -11777,7 +11778,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/usersPage.py policyc
+ if user == "root" or user == "user_u":
+ raise ValueError(_("SELinux user '%s' is required") % user)
+
+ self.wait()
+ (rc, out) = commands.getstatusoutput("semanage user -d %s" % user)
+ self.ready()
+ if rc != 0:
+ self.error(out)
+ return False

View File

@ -6,7 +6,7 @@
Summary: SELinux policy core utilities
Name: policycoreutils
Version: 2.0.31
Release: 11%{?dist}
Release: 12%{?dist}
License: GPLv2+
Group: System Environment/Base
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
@ -208,6 +208,9 @@ fi
%changelog
* Mon Nov 5 2007 Dan Walsh <dwalsh@redhat.com> 2.0.31-12
- Fix filter and search capabilities, add wait cursor
* Fri Nov 2 2007 Dan Walsh <dwalsh@redhat.com> 2.0.31-11
- Translate booleans via policy.xml
- Allow booleans to be set via semanage