2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/booleansPage.py policycoreutils-2.0.46/gui/booleansPage.py
2007-02-20 14:57:59 +00:00
--- nsapolicycoreutils/gui/booleansPage.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/booleansPage.py 2008-04-06 08:09:08.000000000 -0400
2007-11-05 21:30:56 +00:00
@@ -0,0 +1,230 @@
2007-02-20 14:57:59 +00:00
+#
+# booleansPage.py - GUI for Booleans page in system-config-securitylevel
+#
+# Dan Walsh <dwalsh@redhat.com>
+#
2007-09-24 16:22:03 +00:00
+# Copyright 2006, 2007 Red Hat, Inc.
2007-02-20 14:57:59 +00:00
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+import string
+import gtk
+import gtk.glade
+import os
+import gobject
+import sys
+import tempfile
2007-09-24 16:22:03 +00:00
+import seobject
2007-11-05 21:30:56 +00:00
+import semanagePage
2007-02-20 14:57:59 +00:00
+
+INSTALLPATH='/usr/share/system-config-selinux'
+sys.path.append(INSTALLPATH)
+
+import commands
+ENFORCING=0
+PERMISSIVE=1
+DISABLED=2
+
+##
+## I18N
+##
+PROGNAME="system-config-selinux"
+
+import gettext
+gettext.bindtextdomain(PROGNAME, "/usr/share/locale")
+gettext.textdomain(PROGNAME)
+try:
2007-06-11 16:47:29 +00:00
+ gettext.install(PROGNAME,
+ localedir="/usr/share/locale",
+ unicode=False,
+ codeset = 'utf-8')
2007-02-20 14:57:59 +00:00
+except IOError:
+ import __builtin__
+ __builtin__.__dict__['_'] = unicode
+
2007-04-09 14:15:34 +00:00
+from glob import fnmatch
+
2007-02-20 14:57:59 +00:00
+class Modifier:
+ def __init__(self,name, on, save):
+ self.on=on
+ self.name=name
+ self.save=save
+
+ def set(self,value):
+ self.on=value
+ self.save=True
+
+ def isOn(self):
+ return self.on
+
+class Boolean(Modifier):
+ def __init__(self,name, val, save=False):
+ Modifier.__init__(self,name, val, save)
+
2007-11-05 21:30:56 +00:00
+ACTIVE = 0
+MODULE = 1
+DESC = 2
+BOOLEAN = 3
2007-02-20 14:57:59 +00:00
+
+class booleansPage:
+ def __init__(self, xml, doDebug=None):
+ self.xml = xml
2007-11-05 21:30:56 +00:00
+ self.window = self.xml.get_widget("mainWindow").get_root_window()
2007-09-24 16:22:03 +00:00
+ self.local = False
2007-02-20 14:57:59 +00:00
+ self.types=[]
+ self.selinuxsupport = True
+ self.typechanged = False
+ self.doDebug = doDebug
2007-11-05 21:30:56 +00:00
+ self.busy_cursor = gtk.gdk.Cursor(gtk.gdk.WATCH)
+ self.ready_cursor = gtk.gdk.Cursor(gtk.gdk.LEFT_PTR)
2007-02-20 14:57:59 +00:00
+
+ # Bring in widgets from glade file.
+ self.typeHBox = xml.get_widget("typeHBox")
+ self.booleanSW = xml.get_widget("booleanSW")
2007-04-09 14:15:34 +00:00
+ self.booleansFilter = xml.get_widget("booleansFilter")
+ self.booleansFilter.connect("focus_out_event", self.filter_changed)
+ self.booleansFilter.connect("activate", self.filter_changed)
+
2007-02-20 14:57:59 +00:00
+ self.booleansView = xml.get_widget("booleansView")
+ self.typeLabel = xml.get_widget("typeLabel")
+ self.modifySeparator = xml.get_widget("modifySeparator")
+
2007-10-01 21:45:35 +00:00
+ self.revertButton = xml.get_widget("booleanRevertButton")
+ self.revertButton.set_sensitive(self.local)
2007-02-20 14:57:59 +00:00
+ listStore = gtk.ListStore(gobject.TYPE_STRING)
+ cell = gtk.CellRendererText()
+
2007-11-05 21:30:56 +00:00
+ 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)
2007-02-20 14:57:59 +00:00
+
+ checkbox = gtk.CellRendererToggle()
+ checkbox.connect("toggled", self.boolean_toggled)
2007-11-05 21:30:56 +00:00
+ col = gtk.TreeViewColumn('Active', checkbox, active = ACTIVE)
2007-02-20 14:57:59 +00:00
+ col.set_clickable(True)
2007-11-05 21:30:56 +00:00
+ col.set_sort_column_id(ACTIVE)
+ self.booleansView.append_column(col)
+
+ 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)
2007-02-20 14:57:59 +00:00
+ self.booleansView.append_column(col)
+
2007-11-05 21:30:56 +00:00
+ 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)
2007-02-20 14:57:59 +00:00
+ self.booleansView.append_column(col)
2007-04-09 14:15:34 +00:00
+ self.filter=""
2007-09-24 16:22:03 +00:00
+ self.load(self.filter)
2007-02-20 14:57:59 +00:00
+
2007-11-05 21:30:56 +00:00
+ 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()
+
2007-10-01 21:45:35 +00:00
+ def deleteDialog(self):
+ store, iter = self.booleansView.get_selection().get_selected()
2007-11-05 21:30:56 +00:00
+ boolean = store.get_value(iter, BOOLEAN)
+ # change cursor
2007-10-01 21:45:35 +00:00
+ if boolean == None:
+ return
+ try:
2007-11-05 21:30:56 +00:00
+ self.wait()
+ self.booleansView.get_root_window().set_cursor(cursor)
2007-10-01 21:45:35 +00:00
+ (rc, out) = commands.getstatusoutput("semanage boolean -d %s" % boolean)
+
2007-11-05 21:30:56 +00:00
+ self.ready()
2007-10-01 21:45:35 +00:00
+ if rc != 0:
+ return self.error(out)
+ self.load(self.filter)
+ except ValueError, e:
+ self.error(e.args[0])
+
2007-04-09 14:15:34 +00:00
+ def filter_changed(self, *arg):
+ filter = arg[0].get_text()
+ if filter != self.filter:
2007-09-24 16:22:03 +00:00
+ self.load(filter)
2007-04-09 14:15:34 +00:00
+ self.filter=filter
+
2007-03-19 14:48:15 +00:00
+ def use_menus(self):
+ return False
+
2007-02-20 14:57:59 +00:00
+ def get_description(self):
+ return _("Boolean")
+
2007-11-05 21:30:56 +00:00
+ 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
+
+
2007-09-24 16:22:03 +00:00
+ def load(self, filter=None):
2007-11-05 21:30:56 +00:00
+ self.store.clear()
+ self.booleans = seobject.booleanRecords()
+ booleansList = self.booleans.get_all(self.local)
2007-09-24 16:22:03 +00:00
+ for name in booleansList:
2007-11-05 21:30:56 +00:00
+ 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)
2007-02-20 14:57:59 +00:00
+
+ def boolean_toggled(self, widget, row):
2007-11-05 21:30:56 +00:00
+ 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()
2007-02-20 14:57:59 +00:00
+ setsebool="/usr/sbin/setsebool -P %s=%d" % (key, not val)
+ commands.getstatusoutput(setsebool)
2007-11-05 21:30:56 +00:00
+ self.ready()
2007-09-24 16:22:03 +00:00
+
+ def on_local_clicked(self, button):
+ self.local = not self.local
2007-10-01 21:45:35 +00:00
+ self.revertButton.set_sensitive(self.local)
+
2007-09-24 16:22:03 +00:00
+ if self.local:
+ button.set_label(_("all"))
+ else:
+ button.set_label(_("Customized"))
+
+ self.load(self.filter)
+ return True
+
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/fcontextPage.py policycoreutils-2.0.46/gui/fcontextPage.py
2007-02-20 14:57:59 +00:00
--- nsapolicycoreutils/gui/fcontextPage.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/fcontextPage.py 2008-04-06 08:09:08.000000000 -0400
2007-11-05 21:30:56 +00:00
@@ -0,0 +1,217 @@
2007-02-20 14:57:59 +00:00
+## fcontextPage.py - show selinux mappings
+## Copyright (C) 2006 Red Hat, Inc.
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+## Author: Dan Walsh
+import gtk
+import gtk.glade
+import os
+import gobject
+import seobject
2007-03-19 14:48:15 +00:00
+import commands
2007-02-20 14:57:59 +00:00
+from semanagePage import *;
2007-02-22 17:43:38 +00:00
+
2007-03-19 14:48:15 +00:00
+SPEC_COL = 0
+TYPE_COL = 1
+FTYPE_COL = 2
+
2007-02-22 17:43:38 +00:00
+class context:
+ def __init__(self, scontext):
+ self.scontext = scontext
+ con=scontext.split(":")
2007-11-05 21:30:56 +00:00
+ self.type = con[0]
+ if len(con) > 1:
+ self.mls = con[1]
2007-02-22 17:43:38 +00:00
+ else:
+ self.mls = "s0"
+
+ def __str__(self):
+ return self.scontext
2007-02-20 14:57:59 +00:00
+
+##
+## I18N
+##
+PROGNAME="system-config-selinux"
+
+import gettext
+gettext.bindtextdomain(PROGNAME, "/usr/share/locale")
+gettext.textdomain(PROGNAME)
+try:
2007-06-11 16:47:29 +00:00
+ gettext.install(PROGNAME,
+ localedir="/usr/share/locale",
+ unicode=False,
+ codeset = 'utf-8')
2007-02-20 14:57:59 +00:00
+except IOError:
+ import __builtin__
+ __builtin__.__dict__['_'] = unicode
+
2007-11-05 21:30:56 +00:00
+
2007-02-20 14:57:59 +00:00
+class fcontextPage(semanagePage):
+ def __init__(self, xml):
+ semanagePage.__init__(self, xml, "fcontext", _("File Labeling"))
2007-04-15 01:42:09 +00:00
+ self.fcontextFilter = xml.get_widget("fcontextFilterEntry")
+ self.fcontextFilter.connect("focus_out_event", self.filter_changed)
+ self.fcontextFilter.connect("activate", self.filter_changed)
2007-11-05 21:30:56 +00:00
+
2007-02-20 14:57:59 +00:00
+ self.store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING)
2007-11-05 21:30:56 +00:00
+ self.view = xml.get_widget("fcontextView")
2007-02-20 14:57:59 +00:00
+ self.view.set_model(self.store)
2007-11-05 21:30:56 +00:00
+ self.view.set_search_equal_func(self.search)
2007-02-20 14:57:59 +00:00
+
2007-03-19 14:48:15 +00:00
+ col = gtk.TreeViewColumn(_("File\nSpecification"), gtk.CellRendererText(), text=SPEC_COL)
2007-02-20 14:57:59 +00:00
+ col.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
+ col.set_fixed_width(250)
+
2007-03-19 14:48:15 +00:00
+ col.set_sort_column_id(SPEC_COL)
2007-02-20 14:57:59 +00:00
+ col.set_resizable(True)
+ self.view.append_column(col)
2007-11-05 21:30:56 +00:00
+ col = gtk.TreeViewColumn(_("Selinux\nFile Type"), gtk.CellRendererText(), text=TYPE_COL)
2007-02-20 14:57:59 +00:00
+
+ col.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
+ col.set_fixed_width(250)
2007-03-19 14:48:15 +00:00
+ col.set_sort_column_id(TYPE_COL)
2007-02-20 14:57:59 +00:00
+ col.set_resizable(True)
+ self.view.append_column(col)
+ col = gtk.TreeViewColumn(_("File\nType"), gtk.CellRendererText(), text=2)
2007-03-19 14:48:15 +00:00
+ col.set_sort_column_id(FTYPE_COL)
2007-02-20 14:57:59 +00:00
+ col.set_resizable(True)
+ self.view.append_column(col)
2007-11-05 21:30:56 +00:00
+
+ self.store.set_sort_column_id(SPEC_COL, gtk.SORT_ASCENDING)
2007-02-20 14:57:59 +00:00
+ self.load()
+ self.fcontextEntry = xml.get_widget("fcontextEntry")
+ self.fcontextFileTypeCombo = xml.get_widget("fcontextFileTypeCombo")
+ liststore=self.fcontextFileTypeCombo.get_model()
+ for k in seobject.file_types:
+ if len(k) > 0 and k[0] != '-':
+ iter=liststore.append()
+ liststore.set_value(iter, 0, k)
+ iter = liststore.get_iter_first()
+ self.fcontextFileTypeCombo.set_active_iter(iter)
+ self.fcontextTypeEntry = xml.get_widget("fcontextTypeEntry")
+ self.fcontextMLSEntry = xml.get_widget("fcontextMLSEntry")
+
2007-04-15 01:42:09 +00:00
+ def match(self, fcon, filter):
+ try:
+ f=filter.lower()
+ for con in fcon:
+ k=con.lower()
+ if k.find(f) >= 0:
+ return True
+ except:
+ pass
+ return False
+
+ def load(self, filter=""):
+ self.filter=filter
2007-02-20 14:57:59 +00:00
+ self.fcontext=seobject.fcontextRecords()
2007-09-24 16:22:03 +00:00
+ fcon_list=self.fcontext.get_all(self.local)
2007-02-20 14:57:59 +00:00
+ self.store.clear()
+ for fcon in fcon_list:
2007-04-15 01:42:09 +00:00
+ if not self.match(fcon, filter):
+ continue
2007-02-20 14:57:59 +00:00
+ iter=self.store.append()
2007-03-19 14:48:15 +00:00
+ self.store.set_value(iter, SPEC_COL, fcon[0])
+ self.store.set_value(iter, FTYPE_COL, fcon[1])
2007-02-20 14:57:59 +00:00
+ if len(fcon) > 3:
2007-11-05 21:30:56 +00:00
+ rec="%s:%s" % (fcon[4], seobject.translate(fcon[5],False))
2007-02-20 14:57:59 +00:00
+ else:
+ rec="<<None>>"
2007-11-05 21:30:56 +00:00
+ self.store.set_value(iter, TYPE_COL, rec)
2007-02-20 14:57:59 +00:00
+ self.view.get_selection().select_path ((0,))
+
2007-04-15 01:42:09 +00:00
+ def filter_changed(self, *arg):
+ filter = arg[0].get_text()
+ if filter != self.filter:
+ self.load(filter)
2007-09-24 16:22:03 +00:00
+
2007-02-20 14:57:59 +00:00
+ def dialogInit(self):
+ store, iter = self.view.get_selection().get_selected()
2007-03-19 14:48:15 +00:00
+ self.fcontextEntry.set_text(store.get_value(iter, SPEC_COL))
2007-02-20 14:57:59 +00:00
+ self.fcontextEntry.set_sensitive(False)
2007-03-19 14:48:15 +00:00
+ scontext = store.get_value(iter, TYPE_COL)
2007-02-20 14:57:59 +00:00
+ scon=context(scontext)
+ self.fcontextTypeEntry.set_text(scon.type)
+ self.fcontextMLSEntry.set_text(scon.mls)
2007-03-19 14:48:15 +00:00
+ type=store.get_value(iter, FTYPE_COL)
2007-02-20 14:57:59 +00:00
+ liststore=self.fcontextFileTypeCombo.get_model()
+ iter = liststore.get_iter_first()
+ while iter != None and liststore.get_value(iter,0) != type:
+ iter = liststore.iter_next(iter)
+ if iter != None:
+ self.fcontextFileTypeCombo.set_active_iter(iter)
+ self.fcontextFileTypeCombo.set_sensitive(False)
+
+ def dialogClear(self):
+ self.fcontextEntry.set_text("")
+ self.fcontextEntry.set_sensitive(True)
+ self.fcontextFileTypeCombo.set_sensitive(True)
+ self.fcontextTypeEntry.set_text("")
+ self.fcontextMLSEntry.set_text("s0")
+
+ def delete(self):
+ store, iter = self.view.get_selection().get_selected()
+ try:
2007-03-19 14:48:15 +00:00
+ fspec=store.get_value(iter, SPEC_COL)
+ ftype=store.get_value(iter, FTYPE_COL)
2007-11-05 21:30:56 +00:00
+ self.wait()
2007-12-11 02:47:29 +00:00
+ (rc, out) = commands.getstatusoutput("semanage fcontext -d -f '%s' '%s'" % (ftype, fspec))
2007-11-05 21:30:56 +00:00
+ self.ready()
2007-03-19 14:48:15 +00:00
+
+ if rc != 0:
+ return self.error(out)
2007-02-20 14:57:59 +00:00
+ store.remove(iter)
+ self.view.get_selection().select_path ((0,))
+ except ValueError, e:
+ self.error(e.args[0])
+
+ def add(self):
+ fspec=self.fcontextEntry.get_text().strip()
+ type=self.fcontextTypeEntry.get_text().strip()
+ mls=self.fcontextMLSEntry.get_text().strip()
+ list_model=self.fcontextFileTypeCombo.get_model()
+ iter = self.fcontextFileTypeCombo.get_active_iter()
+ ftype=list_model.get_value(iter,0)
2007-11-05 21:30:56 +00:00
+ self.wait()
2007-11-15 16:02:26 +00:00
+ (rc, out) = commands.getstatusoutput("semanage fcontext -a -t %s -r %s -f '%s' '%s'" % (type, mls, ftype, fspec))
2007-11-05 21:30:56 +00:00
+ self.ready()
2007-03-19 14:48:15 +00:00
+ if rc != 0:
+ self.error(out)
+ return False
+
2007-02-20 14:57:59 +00:00
+ iter=self.store.append()
2007-03-19 14:48:15 +00:00
+ self.store.set_value(iter, SPEC_COL, fspec)
+ self.store.set_value(iter, FTYPE_COL, ftype)
2007-11-05 21:30:56 +00:00
+ self.store.set_value(iter, TYPE_COL, "%s:%s" % (type, mls))
2007-02-20 14:57:59 +00:00
+
+ def modify(self):
+ fspec=self.fcontextEntry.get_text().strip()
+ type=self.fcontextTypeEntry.get_text().strip()
+ mls=self.fcontextMLSEntry.get_text().strip()
+ list_model=self.fcontextFileTypeCombo.get_model()
+ iter = self.fcontextFileTypeCombo.get_active_iter()
+ ftype=list_model.get_value(iter,0)
2007-11-05 21:30:56 +00:00
+ self.wait()
2007-11-15 16:02:26 +00:00
+ (rc, out) = commands.getstatusoutput("semanage fcontext -m -t %s -r %s -f '%s' '%s'" % (type, mls, ftype, fspec))
2007-11-05 21:30:56 +00:00
+ self.ready()
2007-03-19 14:48:15 +00:00
+ if rc != 0:
+ self.error(out)
+ return False
2007-02-20 14:57:59 +00:00
+
+ store, iter = self.view.get_selection().get_selected()
2007-03-19 14:48:15 +00:00
+ self.store.set_value(iter, SPEC_COL, fspec)
+ self.store.set_value(iter, FTYPE_COL, ftype)
2007-11-05 21:30:56 +00:00
+ self.store.set_value(iter, TYPE_COL, "%s:%s" % (type, mls))
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/loginsPage.py policycoreutils-2.0.46/gui/loginsPage.py
2007-02-20 14:57:59 +00:00
--- nsapolicycoreutils/gui/loginsPage.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/loginsPage.py 2008-04-06 08:09:08.000000000 -0400
2007-11-05 21:30:56 +00:00
@@ -0,0 +1,185 @@
2007-02-20 14:57:59 +00:00
+## loginsPage.py - show selinux mappings
+## Copyright (C) 2006 Red Hat, Inc.
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+## Author: Dan Walsh
+import string
+import gtk
+import gtk.glade
+import os
+import gobject
+import sys
2007-03-19 14:48:15 +00:00
+import commands
2007-02-20 14:57:59 +00:00
+import seobject
+from semanagePage import *;
+
+##
+## I18N
+##
+PROGNAME="policycoreutils"
+import gettext
+gettext.bindtextdomain(PROGNAME, "/usr/share/locale")
+gettext.textdomain(PROGNAME)
+try:
2007-06-11 16:47:29 +00:00
+ gettext.install(PROGNAME,
+ localedir="/usr/share/locale",
+ unicode=False,
+ codeset = 'utf-8')
2007-02-20 14:57:59 +00:00
+except IOError:
+ import __builtin__
+ __builtin__.__dict__['_'] = unicode
+
+class loginsPage(semanagePage):
+ def __init__(self, xml):
+ self.firstTime = False
+ semanagePage.__init__(self, xml, "logins", _("User Mapping"))
+ self.store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING)
+ self.view.set_model(self.store)
+ self.store.set_sort_column_id(0, gtk.SORT_ASCENDING)
+ col = gtk.TreeViewColumn(_("Login\nName"), gtk.CellRendererText(), text = 0)
+ col.set_sort_column_id(0)
+ col.set_resizable(True)
+ self.view.append_column(col)
+ col = gtk.TreeViewColumn(_("SELinux\nUser"), gtk.CellRendererText(), text = 1)
+ col.set_resizable(True)
+ self.view.append_column(col)
+ col = gtk.TreeViewColumn(_("MLS/\nMCS Range"), gtk.CellRendererText(), text = 2)
+ col.set_resizable(True)
+ self.view.append_column(col)
+ self.load()
+ self.loginsNameEntry = xml.get_widget("loginsNameEntry")
+ self.loginsSelinuxUserCombo = xml.get_widget("loginsSelinuxUserCombo")
+ self.loginsMLSEntry = xml.get_widget("loginsMLSEntry")
+
2007-06-13 20:59:11 +00:00
+ def load(self, filter = ""):
+ self.filter=filter
2007-02-20 14:57:59 +00:00
+ self.login = seobject.loginRecords()
2007-09-24 16:22:03 +00:00
+ dict = self.login.get_all(0)
2007-02-20 14:57:59 +00:00
+ keys = dict.keys()
+ keys.sort()
+ self.store.clear()
+ for k in keys:
2007-06-13 20:59:11 +00:00
+ range = seobject.translate(dict[k][1])
+ if not (self.match(k, filter) or self.match(dict[k][0], filter) or self.match(range, filter)):
+ continue
2007-02-20 14:57:59 +00:00
+ iter = self.store.append()
+ self.store.set_value(iter, 0, k)
+ self.store.set_value(iter, 1, dict[k][0])
2007-06-13 20:59:11 +00:00
+ self.store.set_value(iter, 2, range)
2007-02-20 14:57:59 +00:00
+ self.view.get_selection().select_path ((0,))
+
+ def __dialogSetup(self):
+ if self.firstTime == True:
+ return
+ self.firstTime = True
+ liststore = gtk.ListStore(gobject.TYPE_STRING)
+ self.loginsSelinuxUserCombo.set_model(liststore)
+ cell = gtk.CellRendererText()
+ self.loginsSelinuxUserCombo.pack_start(cell, True)
+ self.loginsSelinuxUserCombo.add_attribute(cell, 'text', 0)
+
2007-09-24 16:22:03 +00:00
+ selusers = seobject.seluserRecords().get_all(0)
2007-02-20 14:57:59 +00:00
+ keys = selusers.keys()
+ keys.sort()
+ for k in keys:
+ if k != "system_u":
+ self.loginsSelinuxUserCombo.append_text(k)
+
+ iter = liststore.get_iter_first()
+ while liststore.get_value(iter,0) != "user_u":
+ iter = liststore.iter_next(iter)
+ self.loginsSelinuxUserCombo.set_active_iter(iter)
+
+ def dialogInit(self):
+ self.__dialogSetup()
+ store, iter = self.view.get_selection().get_selected()
+ self.loginsNameEntry.set_text(store.get_value(iter, 0))
+ self.loginsNameEntry.set_sensitive(False)
+
+ self.loginsMLSEntry.set_text(store.get_value(iter, 2))
+ seuser = store.get_value(iter, 1)
+ liststore = self.loginsSelinuxUserCombo.get_model()
+ iter = liststore.get_iter_first()
+ while iter != None and liststore.get_value(iter,0) != seuser:
+ iter = liststore.iter_next(iter)
+ if iter != None:
+ self.loginsSelinuxUserCombo.set_active_iter(iter)
+
+
+ def dialogClear(self):
+ self.__dialogSetup()
+ self.loginsNameEntry.set_text("")
+ self.loginsNameEntry.set_sensitive(True)
+ self.loginsMLSEntry.set_text("s0")
+
+ def delete(self):
+ store, iter = self.view.get_selection().get_selected()
+ try:
+ login=store.get_value(iter, 0)
+ if login == "root" or login == "__default__":
+ raise ValueError(_("Login '%s' is required") % login)
+
2007-11-05 21:30:56 +00:00
+ self.wait()
2007-03-19 14:48:15 +00:00
+ (rc, out) = commands.getstatusoutput("semanage login -d %s" % login)
2007-11-05 21:30:56 +00:00
+ self.ready()
2007-03-19 14:48:15 +00:00
+ if rc != 0:
+ self.error(out)
+ return False
2007-02-20 14:57:59 +00:00
+ store.remove(iter)
+ self.view.get_selection().select_path ((0,))
+ except ValueError, e:
+ self.error(e.args[0])
+
+ def add(self):
+ target=self.loginsNameEntry.get_text().strip()
+ serange=self.loginsMLSEntry.get_text().strip()
+ if serange == "":
+ serange="s0"
+ list_model=self.loginsSelinuxUserCombo.get_model()
+ iter = self.loginsSelinuxUserCombo.get_active_iter()
+ seuser = list_model.get_value(iter,0)
2007-11-05 21:30:56 +00:00
+ self.wait()
2007-03-19 14:48:15 +00:00
+ (rc, out) = commands.getstatusoutput("semanage login -a -s %s -r %s %s" % (seuser, serange, target))
2007-11-05 21:30:56 +00:00
+ self.ready()
2007-03-19 14:48:15 +00:00
+ if rc != 0:
+ self.error(out)
+ return False
+
2007-02-20 14:57:59 +00:00
+ iter = self.store.append()
+ self.store.set_value(iter, 0, target)
+ self.store.set_value(iter, 1, seuser)
+ self.store.set_value(iter, 2, seobject.translate(serange))
+
+ def modify(self):
+ target=self.loginsNameEntry.get_text().strip()
+ serange=self.loginsMLSEntry.get_text().strip()
+ if serange == "":
+ serange = "s0"
+ list_model = self.loginsSelinuxUserCombo.get_model()
+ iter = self.loginsSelinuxUserCombo.get_active_iter()
+ seuser=list_model.get_value(iter,0)
2007-11-05 21:30:56 +00:00
+ self.wait()
2007-03-19 14:48:15 +00:00
+ (rc, out) = commands.getstatusoutput("semanage login -m -s %s -r %s %s" % (seuser, serange, target))
2007-11-05 21:30:56 +00:00
+ self.ready()
2007-03-19 14:48:15 +00:00
+ if rc != 0:
+ self.error(out)
+ return False
+
2007-02-20 14:57:59 +00:00
+ store, iter = self.view.get_selection().get_selected()
+ self.store.set_value(iter, 0, target)
+ self.store.set_value(iter, 1, seuser)
+ self.store.set_value(iter, 2, seobject.translate(serange))
+
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/Makefile policycoreutils-2.0.46/gui/Makefile
2007-02-20 14:57:59 +00:00
--- nsapolicycoreutils/gui/Makefile 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/Makefile 2008-04-06 08:09:08.000000000 -0400
2007-04-13 17:21:54 +00:00
@@ -0,0 +1,34 @@
2007-02-20 14:57:59 +00:00
+# Installation directories.
+PREFIX ?= ${DESTDIR}/usr
+SHAREDIR ?= $(PREFIX)/share/system-config-selinux
+
+TARGETS= \
+booleansPage.py \
+fcontextPage.py \
+loginsPage.py \
+mappingsPage.py \
+modulesPage.py \
2007-04-13 17:21:54 +00:00
+polgen.py \
+polgen.glade \
2007-02-20 14:57:59 +00:00
+portsPage.py \
+semanagePage.py \
+statusPage.py \
+system-config-selinux.glade \
+translationsPage.py \
+usersPage.py \
+selinux.tbl
+
2007-04-13 17:21:54 +00:00
+all: $(TARGETS) system-config-selinux.py polgengui.py templates
2007-02-20 14:57:59 +00:00
+
+install: all
2007-04-13 17:21:54 +00:00
+ -mkdir -p $(SHAREDIR)/templates
2007-02-20 14:57:59 +00:00
+ install -m 755 system-config-selinux.py $(SHAREDIR)
2007-04-13 17:21:54 +00:00
+ install -m 755 polgengui.py $(SHAREDIR)
2007-02-20 14:57:59 +00:00
+ install -m 644 $(TARGETS) $(SHAREDIR)
2007-04-13 17:21:54 +00:00
+ install -m 644 templates/*.py $(SHAREDIR)/templates/
2007-02-20 14:57:59 +00:00
+
+clean:
+
+indent:
+
+relabel:
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/mappingsPage.py policycoreutils-2.0.46/gui/mappingsPage.py
2007-02-20 14:57:59 +00:00
--- nsapolicycoreutils/gui/mappingsPage.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/mappingsPage.py 2008-04-06 08:09:08.000000000 -0400
2007-09-11 19:04:32 +00:00
@@ -0,0 +1,56 @@
2007-02-20 14:57:59 +00:00
+## mappingsPage.py - show selinux mappings
+## Copyright (C) 2006 Red Hat, Inc.
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+## Author: Dan Walsh
+import string
+import gtk
+import gtk.glade
+import os
+import gobject
+import sys
+import seobject
+
+##
+## I18N
+##
+PROGNAME="policycoreutils"
+import gettext
+gettext.bindtextdomain(PROGNAME, "/usr/share/locale")
+gettext.textdomain(PROGNAME)
+try:
2007-06-11 16:47:29 +00:00
+ gettext.install(PROGNAME,
+ localedir="/usr/share/locale",
+ unicode=False,
+ codeset = 'utf-8')
2007-02-20 14:57:59 +00:00
+except IOError:
+ import __builtin__
+ __builtin__.__dict__['_'] = unicode
+
+class loginsPage:
+ def __init__(self, xml):
+ self.xml = xml
+ self.view = xml.get_widget("mappingsView")
+ self.store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING)
+ self.store.set_sort_column_id(0, gtk.SORT_ASCENDING)
+ self.view.set_model(self.store)
+ self.login = loginRecords()
2007-09-24 16:22:03 +00:00
+ dict = self.login.get_all(0)
2007-02-20 14:57:59 +00:00
+ keys = dict.keys()
+ keys.sort()
+ for k in keys:
+ print "%-25s %-25s %-25s" % (k, dict[k][0], translate(dict[k][1]))
+
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/modulesPage.py policycoreutils-2.0.46/gui/modulesPage.py
2007-02-20 14:57:59 +00:00
--- nsapolicycoreutils/gui/modulesPage.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/modulesPage.py 2008-04-06 08:09:08.000000000 -0400
2007-11-05 21:30:56 +00:00
@@ -0,0 +1,195 @@
2007-02-20 14:57:59 +00:00
+## modulesPage.py - show selinux mappings
+## Copyright (C) 2006 Red Hat, Inc.
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+## Author: Dan Walsh
+import string
+import gtk
+import gtk.glade
+import os
+import commands
+import gobject
+import sys
+import seobject
+import selinux
+from semanagePage import *;
+
+##
+## I18N
+##
+PROGNAME="policycoreutils"
+import gettext
+gettext.bindtextdomain(PROGNAME, "/usr/share/locale")
+gettext.textdomain(PROGNAME)
+try:
2007-06-11 16:47:29 +00:00
+ gettext.install(PROGNAME,
+ localedir="/usr/share/locale",
+ unicode=False,
+ codeset = 'utf-8')
2007-02-20 14:57:59 +00:00
+except IOError:
+ import __builtin__
+ __builtin__.__dict__['_'] = unicode
+
+class modulesPage(semanagePage):
+ def __init__(self, xml):
+ semanagePage.__init__(self, xml, "modules", _("Policy Module"))
2007-06-13 20:59:11 +00:00
+ self.module_filter = xml.get_widget("modulesFilterEntry")
2007-06-11 16:47:29 +00:00
+ self.module_filter.connect("focus_out_event", self.filter_changed)
+ self.module_filter.connect("activate", self.filter_changed)
2007-10-17 03:39:17 +00:00
+ self.audit_enabled = False
2007-06-11 16:47:29 +00:00
+
2007-02-20 14:57:59 +00:00
+ self.store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING)
+ self.view.set_model(self.store)
+ self.store.set_sort_column_id(0, gtk.SORT_ASCENDING)
+ col = gtk.TreeViewColumn(_("Module Name"), gtk.CellRendererText(), text = 0)
+ col.set_sort_column_id(0)
+ col.set_resizable(True)
+ self.view.append_column(col)
+ self.store.set_sort_column_id(0, gtk.SORT_ASCENDING)
+ col = gtk.TreeViewColumn(_("Version"), gtk.CellRendererText(), text = 1)
+ self.enable_audit_button = xml.get_widget("enableAuditButton")
+ self.enable_audit_button.connect("clicked", self.enable_audit)
2007-03-19 14:48:15 +00:00
+ self.new_button = xml.get_widget("newModuleButton")
+ self.new_button.connect("clicked", self.new_module)
2007-02-20 14:57:59 +00:00
+ col.set_sort_column_id(1)
+ col.set_resizable(True)
+ self.view.append_column(col)
+ self.store.set_sort_func(1,self.sort_int, "")
+ status, self.policy_type = selinux.selinux_getpolicytype()
+
+ self.load()
+
+ def sort_int(self, treemodel, iter1, iter2, user_data):
+ try:
+ p1 = int(treemodel.get_value(iter1,1))
+ p2 = int(treemodel.get_value(iter1,1))
+ if p1 > p2:
+ return 1
+ if p1 == p2:
+ return 0
+ return -1
+ except:
+ return 0
+
2007-06-11 16:47:29 +00:00
+ def load(self, filter=""):
+ self.filter=filter
2007-02-20 14:57:59 +00:00
+ self.store.clear()
2007-04-09 14:15:34 +00:00
+ try:
+ fd=os.popen("semodule -l")
+ l = fd.readlines()
+ fd.close()
+ for i in l:
+ module, ver = i.split('\t')
2007-06-11 16:47:29 +00:00
+ if not (self.match(module, filter) or self.match(ver, filter)):
+ continue
2007-04-09 14:15:34 +00:00
+ iter = self.store.append()
+ self.store.set_value(iter, 0, module.strip())
+ self.store.set_value(iter, 1, ver.strip())
+ except:
+ pass
2007-02-20 14:57:59 +00:00
+ self.view.get_selection().select_path ((0,))
+
2007-03-19 14:48:15 +00:00
+
+ def new_module(self, args):
+ try:
+ os.spawnl(os.P_NOWAIT, "/usr/share/system-config-selinux/polgengui.py")
+ except ValueError, e:
+ self.error(e.args[0])
+
2007-02-20 14:57:59 +00:00
+ def delete(self):
+ store, iter = self.view.get_selection().get_selected()
+ module = store.get_value(iter, 0)
+ try:
2007-11-05 21:30:56 +00:00
+ self.wait()
2007-03-19 14:48:15 +00:00
+ status, output = commands.getstatusoutput("semodule -r %s" % module)
2007-11-05 21:30:56 +00:00
+ self.ready()
2007-02-20 14:57:59 +00:00
+ if status != 0:
+ self.error(output)
+ else:
+ store.remove(iter)
+ self.view.get_selection().select_path ((0,))
+
+ except ValueError, e:
+ self.error(e.args[0])
+
+ def enable_audit(self, button):
2007-10-17 03:39:17 +00:00
+ self.audit_enabled = not self.audit_enabled
2007-02-20 14:57:59 +00:00
+ try:
2007-11-05 21:30:56 +00:00
+ self.wait()
2007-10-17 03:39:17 +00:00
+ 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"))
2007-11-05 21:30:56 +00:00
+ self.ready()
2007-10-17 03:39:17 +00:00
+
2007-02-20 14:57:59 +00:00
+ if status != 0:
+ self.error(output)
+
+ except ValueError, e:
+ self.error(e.args[0])
+
+ def disable_audit(self, button):
+ try:
2007-11-05 21:30:56 +00:00
+ self.wait()
2007-10-17 03:39:17 +00:00
+ status, output =commands.getstatusoutput("semodule -B")
2007-11-05 21:30:56 +00:00
+ self.ready()
2007-02-20 14:57:59 +00:00
+ if status != 0:
+ self.error(output)
+
2007-03-19 14:48:15 +00:00
+ except ValueError, e:
+ self.error(e.args[0])
+
+ def propertiesDialog(self):
+ # Do nothing
+ return
+
+ def addDialog(self):
+ dialog = gtk.FileChooserDialog(_("Load Policy Module"),
+ None,
+ gtk.FILE_CHOOSER_ACTION_OPEN,
+ (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
+ gtk.STOCK_OPEN, gtk.RESPONSE_OK))
+ dialog.set_default_response(gtk.RESPONSE_OK)
+
+ filter = gtk.FileFilter()
+ filter.set_name("Policy Files")
+ filter.add_pattern("*.pp")
+ dialog.add_filter(filter)
+
+ response = dialog.run()
+ if response == gtk.RESPONSE_OK:
+ self.add(dialog.get_filename())
+ dialog.destroy()
+
+ def add(self, file):
+ try:
2007-11-05 21:30:56 +00:00
+ self.wait()
2007-03-19 14:48:15 +00:00
+ status, output =commands.getstatusoutput("semodule -i %s" % file)
2007-11-05 21:30:56 +00:00
+ self.ready()
2007-03-19 14:48:15 +00:00
+ if status != 0:
+ self.error(output)
+ else:
+ self.load()
+
+ except ValueError, e:
+ self.error(e.args[0])
+
+
+
+
+
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.glade policycoreutils-2.0.46/gui/polgen.glade
2007-03-19 14:48:15 +00:00
--- nsapolicycoreutils/gui/polgen.glade 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/polgen.glade 2008-04-06 08:09:08.000000000 -0400
2008-02-13 21:16:28 +00:00
@@ -0,0 +1,3221 @@
2007-03-19 14:48:15 +00:00
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
2007-04-18 17:18:15 +00:00
+<requires lib="gnome"/>
2007-03-19 14:48:15 +00:00
+
2007-08-28 15:45:56 +00:00
+<widget class="GtkFileChooserDialog" id="filechooserdialog">
+ <property name="border_width">5</property>
+ <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
+ <property name="local_only">True</property>
+ <property name="select_multiple">True</property>
+ <property name="show_hidden">True</property>
+ <property name="do_overwrite_confirmation">False</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_MOUSE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">24</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="button5">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-6</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="button6">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-add</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+<widget class="GtkAboutDialog" id="about_dialog">
+ <property name="border_width">5</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="name" translatable="yes">Polgen</property>
+ <property name="copyright" translatable="yes">Red Hat 2007</property>
+ <property name="license" translatable="yes">GPL</property>
+ <property name="wrap_license">False</property>
+ <property name="website">www.redhat.com</property>
+ <property name="authors">Daniel Walsh <dwalsh@redhat.com></property>
+ <property name="translator_credits" translatable="yes" comments="TRANSLATORS: Replace this string with your names, one name per line.">translator-credits</property>
+</widget>
+
2007-03-19 14:48:15 +00:00
+<widget class="GtkWindow" id="main_window">
+ <property name="visible">True</property>
2007-08-28 15:45:56 +00:00
+ <property name="title" translatable="yes">SELinux Policy Generation Tool</property>
2007-03-19 14:48:15 +00:00
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
2007-08-28 15:45:56 +00:00
+ <property name="window_position">GTK_WIN_POS_NONE</property>
2007-03-19 14:48:15 +00:00
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+
+ <child>
2007-08-28 15:45:56 +00:00
+ <widget class="GtkVBox" id="vbox11">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
2007-08-28 15:45:56 +00:00
+ <widget class="GtkNotebook" id="notebook1">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
2008-02-13 21:16:28 +00:00
+ <property name="show_tabs">False</property>
2007-08-28 15:45:56 +00:00
+ <property name="show_border">True</property>
+ <property name="tab_pos">GTK_POS_TOP</property>
+ <property name="scrollable">False</property>
+ <property name="enable_popup">False</property>
2007-03-19 14:48:15 +00:00
+
+ <child>
2007-08-28 15:45:56 +00:00
+ <widget class="GnomeDruidPageEdge" id="start_page">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
2007-04-18 17:18:15 +00:00
+ <property name="position">GNOME_EDGE_START</property>
+ <property name="title" translatable="yes">SELinux Policy Generation Druid</property>
2007-08-31 19:10:10 +00:00
+ <property name="text" translatable="yes">This tool can be used to generate a policy framework, to confine applications or users using SELinux.
2007-08-28 15:45:56 +00:00
+
+The tool generates:
2007-08-31 19:10:10 +00:00
+Type enforcement file (te)
2007-08-28 15:45:56 +00:00
+Interface file (if)
2007-08-31 19:10:10 +00:00
+File context file (fc)
2007-08-28 15:45:56 +00:00
+Shell script (sh) - used to compile and install the policy. </property>
2007-03-19 14:48:15 +00:00
+ </widget>
2007-08-28 15:45:56 +00:00
+ <packing>
2007-10-02 20:21:53 +00:00
+ <property name="tab_expand">True</property>
2007-08-28 15:45:56 +00:00
+ <property name="tab_fill">True</property>
+ </packing>
2007-03-19 14:48:15 +00:00
+ </child>
+
+ <child>
2007-08-28 15:45:56 +00:00
+ <widget class="GtkLabel" id="label25">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
2007-08-28 15:45:56 +00:00
+ <property name="label" translatable="yes">label25</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="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GnomeDruidPageStandard" id="select_type_page">
+ <property name="visible">True</property>
2007-10-02 20:21:53 +00:00
+ <property name="title" translatable="yes">Select type of the application/user role to be confined</property>
2007-08-28 15:45:56 +00:00
+ <signal name="next" handler="on_select_type_page_next" last_modification_time="Sat, 04 Aug 2007 11:39:15 GMT"/>
2007-03-19 14:48:15 +00:00
+
2007-04-18 17:18:15 +00:00
+ <child internal-child="vbox">
2007-08-28 15:45:56 +00:00
+ <widget class="GtkVBox" id="druid-vbox17">
2007-04-18 17:18:15 +00:00
+ <property name="border_width">16</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
2007-03-19 14:48:15 +00:00
+
2007-04-18 17:18:15 +00:00
+ <child>
2007-08-31 19:10:10 +00:00
+ <widget class="GtkVBox" id="vbox14">
2007-04-18 17:18:15 +00:00
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
2007-08-28 15:45:56 +00:00
+ <property name="spacing">0</property>
2007-04-18 17:18:15 +00:00
+
+ <child>
2008-02-13 20:55:23 +00:00
+ <widget class="GtkHBox" id="hbox16">
2007-04-18 17:18:15 +00:00
+ <property name="visible">True</property>
2008-02-13 20:55:23 +00:00
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
2007-03-19 14:48:15 +00:00
+
2007-08-31 19:10:10 +00:00
+ <child>
2008-02-13 20:55:23 +00:00
+ <widget class="GtkFrame" id="frame9">
2007-08-31 19:10:10 +00:00
+ <property name="visible">True</property>
2008-02-13 20:55:23 +00:00
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
2007-04-18 17:18:15 +00:00
+
2007-08-31 19:10:10 +00:00
+ <child>
2008-02-13 20:55:23 +00:00
+ <widget class="GtkAlignment" id="alignment15">
2007-08-31 19:10:10 +00:00
+ <property name="visible">True</property>
2008-02-13 20:55:23 +00:00
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
2007-04-18 17:18:15 +00:00
+
2007-08-31 19:10:10 +00:00
+ <child>
2008-02-13 20:55:23 +00:00
+ <widget class="GtkVBox" id="vbox6">
2007-08-31 19:10:10 +00:00
+ <property name="visible">True</property>
2008-02-13 20:55:23 +00:00
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
2007-04-18 17:18:15 +00:00
+
2008-02-13 20:55:23 +00:00
+ <child>
+ <widget class="GtkRadioButton" id="init_radiobutton">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Standard Init Daemon are daemons started on boot via init scripts. Usually requires a script in /etc/rc.d/init.d</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Standard Init Daemon</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
2007-04-18 17:18:15 +00:00
+
2008-02-13 20:55:23 +00:00
+ <child>
+ <widget class="GtkRadioButton" id="inetd_radiobutton">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Internet Services Daemon are daemons started by xinetd</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Internet Services Daemon (inetd)</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">init_radiobutton</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkRadioButton" id="cgi_radiobutton">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Web Applications/Script (CGI) CGI scripts started by the web server (apache)</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Web Application/Script (CGI)</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">init_radiobutton</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkRadioButton" id="user_radiobutton">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">User Application are any application that you would like to confine that is started by a user</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">User Application</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">init_radiobutton</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
2007-08-31 19:10:10 +00:00
+ </widget>
+ </child>
2008-02-13 20:55:23 +00:00
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label41">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Applications</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</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="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkFrame" id="frame10">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment16">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
2007-04-18 17:18:15 +00:00
+
2007-08-31 19:10:10 +00:00
+ <child>
2008-02-13 20:55:23 +00:00
+ <widget class="GtkVBox" id="vbox15">
2007-08-31 19:10:10 +00:00
+ <property name="visible">True</property>
2008-02-13 20:55:23 +00:00
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkRadioButton" id="existing_user_radiobutton">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Modify an existing login user record.</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Existing User Roles</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">init_radiobutton</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkRadioButton" id="terminal_user_radiobutton">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">This user will login to a machine only via a terminal or remote login. By default this user will have no setuid, no networking, no su, no sudo.</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Minimal Terminal User Role</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">init_radiobutton</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkRadioButton" id="xwindows_user_radiobutton">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">This user can login to a machine via X or terminal. By default this user will have no setuid, no networking, no sudo, no su</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Minimal X Windows User Role</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">init_radiobutton</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkRadioButton" id="login_user_radiobutton">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">User with full networking, no setuid applications without transition, no sudo, no su.</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">User Role</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">init_radiobutton</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkRadioButton" id="admin_user_radiobutton">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">User with full networking, no setuid applications without transition, no su, can sudo to Root Administration Roles</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Admin User Role</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">init_radiobutton</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
2007-08-31 19:10:10 +00:00
+ </widget>
+ </child>
+ </widget>
+ </child>
2008-02-13 20:55:23 +00:00
+
+ <child>
+ <widget class="GtkLabel" id="label42">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Login Users</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</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="type">label_item</property>
+ </packing>
+ </child>
2007-08-28 15:45:56 +00:00
+ </widget>
+ <packing>
2008-02-13 20:55:23 +00:00
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
2007-08-28 15:45:56 +00:00
+ </packing>
+ </child>
2007-08-31 19:10:10 +00:00
+
+ <child>
2008-02-13 20:55:23 +00:00
+ <widget class="GtkFrame" id="frame11">
2007-08-31 19:10:10 +00:00
+ <property name="visible">True</property>
2008-02-13 20:55:23 +00:00
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
2007-08-31 19:10:10 +00:00
+
+ <child>
2008-02-13 20:55:23 +00:00
+ <widget class="GtkAlignment" id="alignment17">
2007-08-31 19:10:10 +00:00
+ <property name="visible">True</property>
2008-02-13 20:55:23 +00:00
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
2007-08-31 19:10:10 +00:00
+
+ <child>
2008-02-13 20:55:23 +00:00
+ <widget class="GtkVBox" id="vbox16">
2007-08-31 19:10:10 +00:00
+ <property name="visible">True</property>
2008-02-13 20:55:23 +00:00
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
2007-08-31 19:10:10 +00:00
+
2008-02-13 20:55:23 +00:00
+ <child>
+ <widget class="GtkRadioButton" id="root_user_radiobutton">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Select Root Administrator User Role, if this user will be used to administer the machine while running as root. This user will not be able to login to the system directly.</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Root Admin User Role</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">init_radiobutton</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
2007-08-31 19:10:10 +00:00
+ </widget>
+ </child>
+ </widget>
+ </child>
2007-08-28 15:45:56 +00:00
+
2008-02-13 20:55:23 +00:00
+ <child>
+ <widget class="GtkLabel" id="label50">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Root Users</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</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="type">label_item</property>
+ </packing>
+ </child>
2007-08-28 15:45:56 +00:00
+ </widget>
+ <packing>
2008-02-13 20:55:23 +00:00
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
2007-08-28 15:45:56 +00:00
+ </packing>
+ </child>
2007-04-18 17:18:15 +00:00
+ </widget>
+ <packing>
+ <property name="padding">0</property>
2007-08-31 19:10:10 +00:00
+ <property name="expand">True</property>
2007-08-28 15:45:56 +00:00
+ <property name="fill">True</property>
2007-04-18 17:18:15 +00:00
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
2007-03-19 14:48:15 +00:00
+ </widget>
2007-08-28 15:45:56 +00:00
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
2007-03-19 14:48:15 +00:00
+ </child>
+
+ <child>
2007-08-31 19:10:10 +00:00
+ <widget class="GtkLabel" id="label26">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
2007-08-31 19:10:10 +00:00
+ <property name="label" translatable="yes">label26</property>
2007-08-28 15:45:56 +00:00
+ <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="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GnomeDruidPageStandard" id="app_page">
+ <property name="visible">True</property>
2007-10-02 20:21:53 +00:00
+ <property name="title" translatable="yes">Enter name of application or user role to be confined</property>
2007-03-19 14:48:15 +00:00
+
2007-04-18 17:18:15 +00:00
+ <child internal-child="vbox">
2007-08-28 15:45:56 +00:00
+ <widget class="GtkVBox" id="druid-vbox5">
2007-04-18 17:18:15 +00:00
+ <property name="border_width">16</property>
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
2007-04-18 17:18:15 +00:00
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
2007-03-19 14:48:15 +00:00
+
+ <child>
2007-08-28 15:45:56 +00:00
+ <widget class="GtkTable" id="table5">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
2007-08-31 19:10:10 +00:00
+ <property name="n_rows">3</property>
2007-08-28 15:45:56 +00:00
+ <property name="n_columns">3</property>
2007-03-19 14:48:15 +00:00
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">0</property>
2007-04-18 17:18:15 +00:00
+ <property name="column_spacing">5</property>
2007-03-19 14:48:15 +00:00
+
+ <child>
2007-08-28 15:45:56 +00:00
+ <widget class="GtkLabel" id="label1">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
2007-08-28 15:45:56 +00:00
+ <property name="label" translatable="yes">Name</property>
2007-03-19 14:48:15 +00:00
+ <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</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
2007-08-28 15:45:56 +00:00
+ <widget class="GtkEntry" id="exec_entry">
+ <property name="visible">True</property>
2007-08-31 19:10:10 +00:00
+ <property name="tooltip" translatable="yes">Enter complete path for executable to be confined.</property>
2007-08-28 15:45:56 +00:00
+ <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>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
2007-08-31 19:10:10 +00:00
+ <widget class="GtkButton" id="exec_button">
2007-08-28 15:45:56 +00:00
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">...</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="on_exec_select_clicked" last_modification_time="Wed, 21 Feb 2007 18:45:26 GMT"/>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="name_entry">
+ <property name="visible">True</property>
2007-10-02 20:21:53 +00:00
+ <property name="tooltip" translatable="yes">Enter unique name for the confined application or user role.</property>
2007-08-28 15:45:56 +00:00
+ <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>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label2">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
2007-08-28 15:45:56 +00:00
+ <property name="label" translatable="yes">Executable</property>
2007-03-19 14:48:15 +00:00
+ <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</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
2007-08-31 19:10:10 +00:00
+
+ <child>
+ <widget class="GtkLabel" id="label40">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Init script</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</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="init_script_entry">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Enter complete path to init script used to start the confined application.</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>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="init_script_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">...</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="on_init_script_select_clicked" last_modification_time="Thu, 30 Aug 2007 15:36:47 GMT"/>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
2007-08-28 15:45:56 +00:00
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
2008-02-13 21:16:28 +00:00
+ <widget class="GtkLabel" id="label28">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">label28</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="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
2008-02-13 20:55:23 +00:00
+ <widget class="GnomeDruidPageStandard" id="existing_user_page">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Select user roles that you want to customize</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="vbox17">
+ <property name="border_width">16</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow5">
+ <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_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="existing_user_treeview">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Select the user roles that will transiton to this applications domains.</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</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>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
2008-02-13 21:16:28 +00:00
+ <widget class="GtkLabel" id="label39">
2007-08-28 15:45:56 +00:00
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">label28</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="type">tab</property>
+ </packing>
+ </child>
2007-03-19 14:48:15 +00:00
+
2007-08-28 15:45:56 +00:00
+ <child>
+ <widget class="GnomeDruidPageStandard" id="transition_page">
+ <property name="visible">True</property>
2007-10-02 20:21:53 +00:00
+ <property name="title" translatable="yes">Select additional domains to which this user role will transition</property>
2007-08-31 19:10:10 +00:00
+
2007-08-28 15:45:56 +00:00
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="vbox13">
+ <property name="border_width">16</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
2007-08-31 19:10:10 +00:00
+
2007-08-28 15:45:56 +00:00
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow4">
+ <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_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
2007-08-31 19:10:10 +00:00
+
2007-03-19 14:48:15 +00:00
+ <child>
2007-08-28 15:45:56 +00:00
+ <widget class="GtkTreeView" id="transition_treeview">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
2007-10-02 20:21:53 +00:00
+ <property name="tooltip" translatable="yes">Select the applications domains that you would like this user role to transition to.</property>
2007-03-19 14:48:15 +00:00
+ <property name="can_focus">True</property>
2007-08-28 15:45:56 +00:00
+ <property name="headers_visible">False</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>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
2007-08-31 19:10:10 +00:00
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
2007-08-28 15:45:56 +00:00
+ </child>
+
+ <child>
2008-02-13 21:16:28 +00:00
+ <widget class="GtkLabel" id="label30">
2007-08-28 15:45:56 +00:00
+ <property name="visible">True</property>
2008-02-13 21:16:28 +00:00
+ <property name="label" translatable="yes">label30</property>
2007-08-28 15:45:56 +00:00
+ <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="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
2007-10-01 21:45:35 +00:00
+ <widget class="GnomeDruidPageStandard" id="user_transition_page">
+ <property name="visible">True</property>
2007-10-02 20:21:53 +00:00
+ <property name="title" translatable="yes">Select user roles that will transition to this domain</property>
2007-10-01 21:45:35 +00:00
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="vbox13">
+ <property name="border_width">16</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow4">
+ <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_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="user_transition_treeview">
+ <property name="visible">True</property>
2007-10-02 20:21:53 +00:00
+ <property name="tooltip" translatable="yes">Select the user roles that will transiton to this applications domains.</property>
2007-10-01 21:45:35 +00:00
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</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>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
2008-02-13 21:16:28 +00:00
+ <widget class="GtkLabel" id="label31">
2007-10-01 21:45:35 +00:00
+ <property name="visible">True</property>
2008-02-13 21:16:28 +00:00
+ <property name="label" translatable="yes">label31</property>
2007-10-01 21:45:35 +00:00
+ <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="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
2007-08-31 19:10:10 +00:00
+ <widget class="GnomeDruidPageStandard" id="admin_page">
2007-08-28 15:45:56 +00:00
+ <property name="visible">True</property>
2007-10-02 20:21:53 +00:00
+ <property name="title" translatable="yes">Select additional domains that this user role will administer</property>
2007-08-28 15:45:56 +00:00
+
+ <child internal-child="vbox">
2007-08-31 19:10:10 +00:00
+ <widget class="GtkVBox" id="vbox13">
2007-08-28 15:45:56 +00:00
+ <property name="border_width">16</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
2007-08-31 19:10:10 +00:00
+ <widget class="GtkScrolledWindow" id="scrolledwindow4">
2007-08-28 15:45:56 +00:00
+ <property name="visible">True</property>
2007-08-31 19:10:10 +00:00
+ <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_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
2007-08-28 15:45:56 +00:00
+
+ <child>
2007-08-31 19:10:10 +00:00
+ <widget class="GtkTreeView" id="admin_treeview">
2007-08-28 15:45:56 +00:00
+ <property name="visible">True</property>
2007-08-31 19:10:10 +00:00
+ <property name="tooltip" translatable="yes">Select the domains that you would like this user administer.</property>
2007-08-28 15:45:56 +00:00
+ <property name="can_focus">True</property>
2007-08-31 19:10:10 +00:00
+ <property name="headers_visible">False</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>
2007-08-28 15:45:56 +00:00
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
2008-02-13 21:16:28 +00:00
+ <widget class="GtkLabel" id="label32">
2007-09-10 19:45:03 +00:00
+ <property name="visible">True</property>
2008-02-13 21:16:28 +00:00
+ <property name="label" translatable="yes">label32</property>
2007-09-10 19:45:03 +00:00
+ <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="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
2007-09-10 15:59:05 +00:00
+ <widget class="GnomeDruidPageStandard" id="roles_page">
+ <property name="visible">True</property>
2007-10-01 21:45:35 +00:00
+ <property name="title" translatable="yes">Select additional roles for this user</property>
2007-09-10 15:59:05 +00:00
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="vbox13">
+ <property name="border_width">16</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow4">
+ <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_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="role_treeview">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Select the domains that you would like this user administer.</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</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>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
2008-02-13 21:16:28 +00:00
+ <widget class="GtkLabel" id="label33">
2007-08-28 15:45:56 +00:00
+ <property name="visible">True</property>
2008-02-13 21:16:28 +00:00
+ <property name="label" translatable="yes">label33</property>
2007-08-28 15:45:56 +00:00
+ <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="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GnomeDruidPageStandard" id="in_net_page">
+ <property name="visible">True</property>
2007-10-02 20:21:53 +00:00
+ <property name="title" translatable="yes">Enter network ports that application/user role listens to</property>
2007-08-28 15:45:56 +00:00
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="druid-vbox6">
+ <property name="border_width">16</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkFrame" id="frame4">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment8">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox7">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox7">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkCheckButton" id="in_tcp_all_checkbutton">
+ <property name="visible">True</property>
2007-10-02 20:21:53 +00:00
+ <property name="tooltip" translatable="yes">Allows confined application/user role to bind to any tcp port</property>
2007-08-28 15:45:56 +00:00
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">All</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">10</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="in_tcp_reserved_checkbutton">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Use this checkbutton if your app calls bindresvport with 0.</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">600-1024</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">10</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="in_tcp_unreserved_checkbutton">
+ <property name="visible">True</property>
2007-10-02 20:21:53 +00:00
+ <property name="tooltip" translatable="yes">Allow application/user role to bind to any tcp ports > 1024</property>
2007-08-28 15:45:56 +00:00
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Unreserved Ports (> 1024)</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">10</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <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="label7">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Select Ports</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</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">5</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="in_tcp_entry">
+ <property name="visible">True</property>
2007-10-02 20:21:53 +00:00
+ <property name="tooltip" translatable="yes">Enter a comma separated list of tcp ports or ranges of ports that application/user role binds to. Example: 612, 650-660</property>
2007-08-28 15:45:56 +00:00
+ <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>
+ </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">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label19">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>TCP Ports</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</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="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkFrame" id="frame5">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment9">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox8">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox9">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkCheckButton" id="in_udp_all_checkbutton">
+ <property name="visible">True</property>
2007-10-02 20:21:53 +00:00
+ <property name="tooltip" translatable="yes">Allows confined application/user role to bind to any udp port</property>
2007-08-28 15:45:56 +00:00
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">All</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">10</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="in_udp_reserved_checkbutton">
+ <property name="visible">True</property>
2007-10-02 20:21:53 +00:00
+ <property name="tooltip" translatable="yes">Allow application/user role to call bindresvport with 0. Binding to port 600-1024</property>
2007-08-28 15:45:56 +00:00
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">600-1024</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">10</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="in_udp_unreserved_checkbutton">
+ <property name="visible">True</property>
2007-10-02 20:21:53 +00:00
+ <property name="tooltip" translatable="yes">Enter a comma separated list of udp ports or ranges of ports that application/user role binds to. Example: 612, 650-660</property>
2007-08-28 15:45:56 +00:00
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Unreserved Ports (>1024)</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">10</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox10">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label20">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Select Ports</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</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">5</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="in_udp_entry">
+ <property name="visible">True</property>
2007-10-02 20:21:53 +00:00
+ <property name="tooltip" translatable="yes">Allows application/user role to bind to any udp ports > 1024</property>
2007-08-28 15:45:56 +00:00
+ <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>
+ </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">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label20">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>UDP Ports</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</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="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
2008-02-13 21:16:28 +00:00
+ <widget class="GtkLabel" id="label34">
2007-08-28 15:45:56 +00:00
+ <property name="visible">True</property>
2008-02-13 21:16:28 +00:00
+ <property name="label" translatable="yes">label34</property>
2007-08-28 15:45:56 +00:00
+ <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="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GnomeDruidPageStandard" id="out_net_page">
+ <property name="visible">True</property>
2007-10-02 20:21:53 +00:00
+ <property name="title" translatable="yes">Enter network ports that application/user role connects to</property>
2007-10-01 21:45:35 +00:00
+
2007-08-28 15:45:56 +00:00
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="druid-vbox7">
+ <property name="border_width">16</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkFrame" id="frame8">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment13">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox12">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment14">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox15">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkCheckButton" id="out_tcp_all_checkbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">All</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">10</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label38">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Select Ports</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</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">5</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="out_tcp_entry">
+ <property name="visible">True</property>
2007-10-02 20:21:53 +00:00
+ <property name="tooltip" translatable="yes">Enter a comma separated list of tcp ports or ranges of ports that application/user role connects to. Example: 612, 650-660</property>
2007-08-28 15:45:56 +00:00
+ <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>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
2007-03-19 14:48:15 +00:00
+ </widget>
+ </child>
+
+ <child>
2007-08-28 15:45:56 +00:00
+ <widget class="GtkLabel" id="label37">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
2007-08-28 15:45:56 +00:00
+ <property name="label" translatable="yes"><b>TCP Ports</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</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>
2007-03-19 14:48:15 +00:00
+ </widget>
+ <packing>
2007-08-28 15:45:56 +00:00
+ <property name="type">label_item</property>
2007-03-19 14:48:15 +00:00
+ </packing>
+ </child>
+ </widget>
2007-04-18 17:18:15 +00:00
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
2007-03-19 14:48:15 +00:00
+ </child>
+
+ <child>
2007-08-28 15:45:56 +00:00
+ <widget class="GtkFrame" id="frame7">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
2007-08-28 15:45:56 +00:00
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
2007-03-19 14:48:15 +00:00
+
+ <child>
2007-08-28 15:45:56 +00:00
+ <widget class="GtkAlignment" id="alignment11">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
2007-08-28 15:45:56 +00:00
+ <property name="xalign">0.5</property>
2007-03-19 14:48:15 +00:00
+ <property name="yalign">0.5</property>
2007-08-28 15:45:56 +00:00
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox12">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkCheckButton" id="out_udp_all_checkbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">All</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">10</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label22">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Select Ports</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</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">5</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="out_udp_entry">
+ <property name="visible">True</property>
2007-10-02 20:21:53 +00:00
+ <property name="tooltip" translatable="yes">Enter a comma separated list of udp ports or ranges of ports that application/user role connects to. Example: 612, 650-660</property>
2007-08-28 15:45:56 +00:00
+ <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>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
2007-03-19 14:48:15 +00:00
+ </widget>
+ </child>
+
+ <child>
2007-08-28 15:45:56 +00:00
+ <widget class="GtkLabel" id="label23">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
2007-08-28 15:45:56 +00:00
+ <property name="label" translatable="yes"><b>UDP Ports</b></property>
2007-03-19 14:48:15 +00:00
+ <property name="use_underline">False</property>
2007-08-28 15:45:56 +00:00
+ <property name="use_markup">True</property>
2007-03-19 14:48:15 +00:00
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
2007-08-28 15:45:56 +00:00
+ <property name="xalign">0.5</property>
2007-03-19 14:48:15 +00:00
+ <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>
2007-08-28 15:45:56 +00:00
+ <property name="type">label_item</property>
2007-03-19 14:48:15 +00:00
+ </packing>
+ </child>
+ </widget>
2007-04-18 17:18:15 +00:00
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
2007-03-19 14:48:15 +00:00
+ </child>
+ </widget>
+ </child>
+ </widget>
2007-08-28 15:45:56 +00:00
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
2008-02-13 21:16:28 +00:00
+ <widget class="GtkLabel" id="label35">
2007-08-28 15:45:56 +00:00
+ <property name="visible">True</property>
2008-02-13 21:16:28 +00:00
+ <property name="label" translatable="yes">label35</property>
2007-08-28 15:45:56 +00:00
+ <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="type">tab</property>
+ </packing>
2007-03-19 14:48:15 +00:00
+ </child>
+
+ <child>
2007-08-28 15:45:56 +00:00
+ <widget class="GnomeDruidPageStandard" id="common_apps_page">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
2007-09-19 02:29:47 +00:00
+ <property name="title" translatable="yes">Select common application traits</property>
2007-03-19 14:48:15 +00:00
+
2007-04-18 17:18:15 +00:00
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="druid-vbox8">
+ <property name="border_width">16</property>
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
2007-04-18 17:18:15 +00:00
+ <property name="spacing">6</property>
2007-03-19 14:48:15 +00:00
+
+ <child>
2007-04-18 17:18:15 +00:00
+ <widget class="GtkVBox" id="vbox4">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
2007-04-18 17:18:15 +00:00
+ <widget class="GtkCheckButton" id="syslog_checkbutton">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
2007-10-02 20:21:53 +00:00
+ <property name="label" translatable="yes">Writes syslog messages </property>
2007-04-18 17:18:15 +00:00
+ <property name="use_underline">True</property>
2007-03-19 14:48:15 +00:00
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
2007-04-18 17:18:15 +00:00
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
2007-03-19 14:48:15 +00:00
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
2007-04-18 17:18:15 +00:00
+ <widget class="GtkCheckButton" id="tmp_checkbutton">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
2007-10-02 20:21:53 +00:00
+ <property name="label" translatable="yes">Create/Manipulate temporary files in /tmp</property>
2007-04-18 17:18:15 +00:00
+ <property name="use_underline">True</property>
2007-03-19 14:48:15 +00:00
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
2007-04-18 17:18:15 +00:00
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="pam_checkbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
2007-10-02 20:21:53 +00:00
+ <property name="label" translatable="yes">Uses Pam for authentication</property>
2007-04-18 17:18:15 +00:00
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
2007-03-19 14:48:15 +00:00
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
2007-04-18 17:18:15 +00:00
+ <widget class="GtkCheckButton" id="uid_checkbutton">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
2007-10-02 20:21:53 +00:00
+ <property name="label" translatable="yes">Uses nsswitch or getpw* calls</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="dbus_checkbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Uses dbus</property>
2007-04-18 17:18:15 +00:00
+ <property name="use_underline">True</property>
2007-03-19 14:48:15 +00:00
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
2007-04-18 17:18:15 +00:00
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
2007-03-19 14:48:15 +00:00
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
2007-10-02 20:21:53 +00:00
+
+ <child>
+ <widget class="GtkCheckButton" id="audit_checkbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Sends audit messages</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="terminal_checkbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Interacts with the terminal</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
2007-10-16 23:47:15 +00:00
+ <widget class="GtkCheckButton" id="mail_checkbutton">
2007-10-02 20:21:53 +00:00
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Sends email</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
2007-03-19 14:48:15 +00:00
+ </widget>
+ <packing>
2007-04-18 17:18:15 +00:00
+ <property name="padding">0</property>
+ <property name="expand">True</property>
2007-03-19 14:48:15 +00:00
+ <property name="fill">True</property>
+ </packing>
+ </child>
2007-04-18 17:18:15 +00:00
+ </widget>
+ </child>
+ </widget>
2007-08-28 15:45:56 +00:00
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
2008-02-13 20:55:23 +00:00
+ <widget class="GtkLabel" id="label51">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">label51</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="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
2007-08-28 15:45:56 +00:00
+ <widget class="GnomeDruidPageStandard" id="files_page">
2007-04-18 17:18:15 +00:00
+ <property name="visible">True</property>
2007-09-19 02:29:47 +00:00
+ <property name="title" translatable="yes">Select files/directories that the application manages</property>
2007-04-18 17:18:15 +00:00
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="druid-vbox9">
+ <property name="border_width">16</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
2007-03-19 14:48:15 +00:00
+
+ <child>
2007-04-18 17:18:15 +00:00
+ <widget class="GtkFrame" id="frame3">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
2007-04-18 17:18:15 +00:00
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
2007-03-19 14:48:15 +00:00
+
+ <child>
2007-04-18 17:18:15 +00:00
+ <widget class="GtkAlignment" id="alignment3">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
2007-04-18 17:18:15 +00:00
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
2007-03-19 14:48:15 +00:00
+
+ <child>
2007-04-18 17:18:15 +00:00
+ <widget class="GtkHBox" id="hbox1">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
2007-04-18 17:18:15 +00:00
+ <widget class="GtkVBox" id="vbox3">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkButton" id="button2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="on_add_clicked" last_modification_time="Wed, 21 Feb 2007 18:47:51 GMT"/>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment6">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">0</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox4">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">2</property>
+
+ <child>
+ <widget class="GtkImage" id="image3">
+ <property name="visible">True</property>
+ <property name="stock">gtk-add</property>
+ <property name="icon_size">4</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label17">
+ <property name="visible">True</property>
+ <property name="label">Add File</property>
+ <property name="use_underline">True</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">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="button9">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="on_add_dir_clicked" last_modification_time="Wed, 21 Feb 2007 22:15:43 GMT"/>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment5">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">0</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox3">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">2</property>
+
+ <child>
+ <widget class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="stock">gtk-add</property>
+ <property name="icon_size">4</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label16">
+ <property name="visible">True</property>
+ <property name="label">Add Directory</property>
+ <property name="use_underline">True</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">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="button4">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-delete</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="on_delete_clicked" last_modification_time="Wed, 21 Feb 2007 18:48:10 GMT"/>
+ <accelerator key="Delete" modifiers="0" signal="clicked"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">4</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow1">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
2007-04-18 17:18:15 +00:00
+ <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+ <property name="vscrollbar_policy">GTK_POLICY_NEVER</property>
2007-03-19 14:48:15 +00:00
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
2007-04-18 17:18:15 +00:00
+ <widget class="GtkViewport" id="viewport1">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
2007-04-18 17:18:15 +00:00
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow2">
+ <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_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="write_treeview">
+ <property name="visible">True</property>
2007-09-19 02:29:47 +00:00
+ <property name="tooltip" translatable="yes">Add Files/Directories that application will need to "Write" to. Pid Files, Log Files, /var/lib Files ...</property>
2007-04-18 17:18:15 +00:00
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</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>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
2007-03-19 14:48:15 +00:00
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
2007-08-28 15:45:56 +00:00
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
2007-10-01 21:45:35 +00:00
+ <widget class="GtkLabel" id="label43">
2007-08-28 15:45:56 +00:00
+ <property name="visible">True</property>
2007-10-01 21:45:35 +00:00
+ <property name="label" translatable="yes"></property>
2007-08-28 15:45:56 +00:00
+ <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="type">tab</property>
+ </packing>
2007-03-19 14:48:15 +00:00
+ </child>
+
+ <child>
2007-10-17 01:33:45 +00:00
+ <widget class="GnomeDruidPageStandard" id="booleans_page">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Select booleans that the application uses</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="druid-vbox19">
+ <property name="border_width">16</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkFrame" id="frame3">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox3">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkButton" id="button2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="on_add_boolean_clicked" last_modification_time="Wed, 17 Oct 2007 00:02:27 GMT"/>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment6">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">0</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox4">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">2</property>
+
+ <child>
+ <widget class="GtkImage" id="image3">
+ <property name="visible">True</property>
+ <property name="stock">gtk-add</property>
+ <property name="icon_size">4</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label17">
+ <property name="visible">True</property>
+ <property name="label">Add Boolean</property>
+ <property name="use_underline">True</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">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="button4">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-delete</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="on_delete_boolean_clicked" last_modification_time="Wed, 17 Oct 2007 00:02:39 GMT"/>
+ <accelerator key="Delete" modifiers="0" signal="clicked"/>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">4</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+ <property name="vscrollbar_policy">GTK_POLICY_NEVER</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkViewport" id="viewport1">
+ <property name="visible">True</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow2">
+ <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_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="boolean_treeview">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Add/Remove booleans used for this confined application/user</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>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label44">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"></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="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
2007-08-28 15:45:56 +00:00
+ <widget class="GnomeDruidPageStandard" id="gen_policy_page">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
2007-09-19 02:29:47 +00:00
+ <property name="title" translatable="yes">Select directory to generate policy in</property>
2007-03-19 14:48:15 +00:00
+
2007-04-18 17:18:15 +00:00
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="druid-vbox10">
+ <property name="border_width">16</property>
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
2007-04-18 17:18:15 +00:00
+ <property name="homogeneous">False</property>
+ <property name="spacing">5</property>
2007-03-19 14:48:15 +00:00
+
+ <child>
2007-04-18 17:18:15 +00:00
+ <widget class="GtkHBox" id="hbox6">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
2007-04-18 17:18:15 +00:00
+ <property name="spacing">0</property>
2007-03-19 14:48:15 +00:00
+
+ <child>
2007-04-18 17:18:15 +00:00
+ <widget class="GtkLabel" id="label18">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
2007-04-18 17:18:15 +00:00
+ <property name="label" translatable="yes">Policy Directory</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>
2007-03-19 14:48:15 +00:00
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
2007-04-18 17:18:15 +00:00
+ <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>
2007-03-19 14:48:15 +00:00
+ </widget>
+ <packing>
2007-04-18 17:18:15 +00:00
+ <property name="padding">5</property>
2007-03-19 14:48:15 +00:00
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
2007-04-18 17:18:15 +00:00
+ <widget class="GtkEntry" id="output_entry">
+ <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>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="output_button">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
2007-04-18 17:18:15 +00:00
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">...</property>
2007-03-19 14:48:15 +00:00
+ <property name="use_underline">True</property>
2007-04-18 17:18:15 +00:00
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
2007-03-19 14:48:15 +00:00
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
2007-04-18 17:18:15 +00:00
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
2007-03-19 14:48:15 +00:00
+ </child>
+ </widget>
+ </child>
+ </widget>
2007-08-28 15:45:56 +00:00
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
2007-10-17 01:33:45 +00:00
+ <widget class="GtkLabel" id="label46">
2007-08-28 15:45:56 +00:00
+ <property name="visible">True</property>
2007-09-10 19:45:03 +00:00
+ <property name="label" translatable="yes"></property>
2007-08-28 15:45:56 +00:00
+ <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="type">tab</property>
+ </packing>
2007-03-19 14:48:15 +00:00
+ </child>
2007-04-18 17:18:15 +00:00
+
+ <child>
2007-10-02 20:21:53 +00:00
+ <widget class="GnomeDruidPageEdge" id="role_finish_page">
+ <property name="visible">True</property>
+ <property name="position">GNOME_EDGE_FINISH</property>
+ <property name="title" translatable="yes">Generated Policy Files</property>
+ <property name="text" translatable="yes">This tool will generate the following:
+Type Enforcement(te), File Context(fc), Interface(if), Shell Script(sh)
2007-10-16 23:47:15 +00:00
+Execute shell script as root to compile/install and relabel files/directories.
2007-10-02 20:21:53 +00:00
+Use semanage or useradd to map Linux login users to user roles.
+Put the machine in permissive mode (setenforce 0).
+Login as the user and test this user role.
+Use audit2allow -R to generate additional rules for the te file.
+</property>
+ </widget>
+ <packing>
+ <property name="tab_expand">True</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
2007-10-17 01:33:45 +00:00
+ <widget class="GtkLabel" id="label45">
2007-10-02 20:21:53 +00:00
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"></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="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
2007-04-18 17:18:15 +00:00
+ <widget class="GnomeDruidPageEdge" id="finish_page">
+ <property name="visible">True</property>
+ <property name="position">GNOME_EDGE_FINISH</property>
+ <property name="title" translatable="yes">Generated Policy Files</property>
2007-10-02 20:21:53 +00:00
+ <property name="text" translatable="yes">This tool will generate the following:
+Type Enforcement(te), File Context(fc), Interface(if), Shell Script(sh)
+
+Execute shell script to compile/install and relabel files/directories.
+Put the machine in permissive mode (setenforce 0).
2007-04-18 17:18:15 +00:00
+Run/restart the application to generate avc messages.
+Use audit2allow -R to generate additional rules for the te file.
+</property>
+ </widget>
2007-08-28 15:45:56 +00:00
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
2007-04-18 17:18:15 +00:00
+ </child>
2007-03-19 14:48:15 +00:00
+
+ <child>
2007-10-17 01:33:45 +00:00
+ <widget class="GtkLabel" id="label47">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
2007-08-31 19:10:10 +00:00
+ <property name="label" translatable="yes"></property>
2007-08-28 15:45:56 +00:00
+ <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>
2007-03-19 14:48:15 +00:00
+ </widget>
2007-08-28 15:45:56 +00:00
+ <packing>
+ <property name="type">tab</property>
+ </packing>
2007-03-19 14:48:15 +00:00
+ </child>
2007-08-28 15:45:56 +00:00
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment12">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">0</property>
+ <property name="right_padding">0</property>
2007-03-19 14:48:15 +00:00
+
+ <child>
2007-08-28 15:45:56 +00:00
+ <widget class="GtkHButtonBox" id="hbuttonbox1">
2007-03-19 14:48:15 +00:00
+ <property name="visible">True</property>
2007-08-28 15:45:56 +00:00
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkButton" id="cancel_button">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="activate" handler="on_cancel_activate" last_modification_time="Wed, 22 Aug 2007 18:47:18 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="back_button">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-go-back</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="activate" handler="on_back_activate" last_modification_time="Wed, 22 Aug 2007 18:47:42 GMT"/>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="forward_button">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-go-forward</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="activate" handler="on_forward_activate" last_modification_time="Wed, 22 Aug 2007 18:48:00 GMT"/>
+ </widget>
+ </child>
2007-03-19 14:48:15 +00:00
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
2007-08-28 15:45:56 +00:00
+ <property name="expand">True</property>
2007-03-19 14:48:15 +00:00
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
2007-10-17 01:33:45 +00:00
+<widget class="GtkDialog" id="boolean_dialog">
+ <property name="title" translatable="yes">Add Booleans Dialog</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_MOUSE</property>
+ <property name="modal">False</property>
+ <property name="default_width">400</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <property name="has_separator">True</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox2">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area2">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="cancelbutton1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-6</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="okbutton1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-add</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkTable" id="table6">
+ <property name="visible">True</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">0</property>
+ <property name="column_spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label48">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Boolean Name</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label49">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Description</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="boolean_name_entry">
+ <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>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="boolean_description_entry">
+ <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>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
2007-03-19 14:48:15 +00:00
+</glade-interface>
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgengui.py policycoreutils-2.0.46/gui/polgengui.py
2007-03-19 14:48:15 +00:00
--- nsapolicycoreutils/gui/polgengui.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/polgengui.py 2008-04-06 08:09:08.000000000 -0400
2008-02-13 20:55:23 +00:00
@@ -0,0 +1,649 @@
2007-10-17 01:33:45 +00:00
+#!/usr/bin/python -E
2007-03-19 14:48:15 +00:00
+#
+# system-config-selinux.py - GUI for SELinux Config tool in system-config-selinux
+#
+# Dan Walsh <dwalsh@redhat.com>
+#
2008-02-13 20:55:23 +00:00
+# Copyright 2007, 2008 Red Hat, Inc.
2007-03-19 14:48:15 +00:00
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+import signal
+import string
+import gtk
+import gtk.glade
+import os
+import gobject
+import gnome
+import sys
+import polgen
2007-08-28 19:31:24 +00:00
+import re
2007-09-10 15:59:05 +00:00
+import commands
+
2007-03-19 14:48:15 +00:00
+
+##
+## I18N
+##
+PROGNAME="system-config-selinux"
+
+import gettext
+gettext.bindtextdomain(PROGNAME, "/usr/share/locale")
+gettext.textdomain(PROGNAME)
+try:
2007-06-11 16:47:29 +00:00
+ gettext.install(PROGNAME,
+ localedir="/usr/share/locale",
+ unicode=False,
+ codeset = 'utf-8')
2007-03-19 14:48:15 +00:00
+except IOError:
+ import __builtin__
+ __builtin__.__dict__['_'] = unicode
+
+gnome.program_init("SELinux Poligy Generation Tool", "5")
+
+version = "1.0"
+
+sys.path.append('/usr/share/system-config-selinux')
+sys.path.append('.')
+
2007-10-16 23:47:15 +00:00
+def get_all_types():
+ try:
+ all_types = []
+ rc, output=commands.getstatusoutput("seinfo --type")
+ if rc == 0:
+ l = output.split()
+ for i in l:
+ all_types.append(i.split("_t")[0])
+ except:
+ pass
+
+ return all_types
+
+def get_all_modules():
+ try:
+ all_modules = []
+ rc, output=commands.getstatusoutput("semodule -l")
+ if rc == 0:
+ l = output.split("\n")
+ for i in l:
+ all_modules.append(i.split()[0])
+ except:
+ pass
+
+ return all_modules
+
2007-08-28 15:45:56 +00:00
+# From John Hunter http://www.daa.com.au/pipermail/pygtk/2003-February/004454.html
+def foreach(model, path, iter, selected):
+ selected.append(model.get_value(iter, 0))
+
2007-03-19 14:48:15 +00:00
+##
+## Pull in the Glade file
+##
+if os.access("polgen.glade", os.F_OK):
+ xml = gtk.glade.XML ("polgen.glade", domain=PROGNAME)
+else:
+ xml = gtk.glade.XML ("/usr/share/system-config-selinux/polgen.glade", domain=PROGNAME)
+
+FILE = 1
+DIR = 2
2007-08-31 19:10:10 +00:00
+
2007-03-19 14:48:15 +00:00
+class childWindow:
2007-08-28 15:45:56 +00:00
+ START_PAGE = 0
+ SELECT_TYPE_PAGE = 1
2007-08-31 19:10:10 +00:00
+ APP_PAGE = 2
2008-02-13 20:55:23 +00:00
+ EXISTING_USER_PAGE = 3
+ TRANSITION_PAGE = 4
+ USER_TRANSITION_PAGE = 5
+ ADMIN_PAGE = 6
+ ROLE_PAGE = 7
+ IN_NET_PAGE = 8
+ OUT_NET_PAGE = 9
+ COMMON_APPS_PAGE = 10
+ FILES_PAGE = 11
+ BOOLEAN_PAGE = 12
+ SELECT_DIR_PAGE = 13
+ GEN_POLICY_PAGE = 14
+ GEN_USER_POLICY_PAGE = 15
2007-08-28 15:45:56 +00:00
+
2007-03-19 14:48:15 +00:00
+ def __init__(self):
+ self.xml = xml
2007-10-16 23:47:15 +00:00
+ self.all_types=get_all_types()
+ self.all_modules=get_all_modules()
+ self.name=""
2007-03-19 14:48:15 +00:00
+ xml.signal_connect("on_delete_clicked", self.delete)
2007-10-17 01:33:45 +00:00
+ xml.signal_connect("on_delete_boolean_clicked", self.delete_boolean)
2007-03-19 14:48:15 +00:00
+ xml.signal_connect("on_exec_select_clicked", self.exec_select)
2007-08-31 19:10:10 +00:00
+ xml.signal_connect("on_init_script_select_clicked", self.init_script_select)
2007-03-19 14:48:15 +00:00
+ xml.signal_connect("on_add_clicked", self.add)
2007-10-17 01:33:45 +00:00
+ xml.signal_connect("on_add_boolean_clicked", self.add_boolean)
2007-03-19 14:48:15 +00:00
+ xml.signal_connect("on_add_dir_clicked", self.add_dir)
+ xml.signal_connect("on_about_clicked", self.on_about_clicked)
2007-08-28 15:45:56 +00:00
+ xml.get_widget ("cancel_button").connect("clicked",self.quit)
+ self.forward_button = xml.get_widget ("forward_button")
+ self.forward_button.connect("clicked",self.forward)
+ self.back_button = xml.get_widget ("back_button")
+ self.back_button.connect("clicked",self.back)
+
2007-10-17 01:33:45 +00:00
+ self.boolean_dialog = xml.get_widget ("boolean_dialog")
+ self.boolean_name_entry = xml.get_widget ("boolean_name_entry")
+ self.boolean_description_entry = xml.get_widget ("boolean_description_entry")
+
2007-08-28 15:45:56 +00:00
+ self.notebook = xml.get_widget ("notebook1")
+ self.pages={}
2007-12-11 02:47:29 +00:00
+ self.finish_page = [ self.GEN_POLICY_PAGE, self.GEN_USER_POLICY_PAGE ]
2007-08-31 19:10:10 +00:00
+ for i in polgen.USERS:
2007-12-11 02:47:29 +00:00
+ self.pages[i] = [ self.START_PAGE, self.SELECT_TYPE_PAGE, self.APP_PAGE, self.TRANSITION_PAGE, self.ROLE_PAGE, self.IN_NET_PAGE, self.OUT_NET_PAGE, self.BOOLEAN_PAGE, self.SELECT_DIR_PAGE, self.GEN_USER_POLICY_PAGE]
2008-02-06 15:19:11 +00:00
+ self.pages[polgen.RUSER] = [ self.START_PAGE, self.SELECT_TYPE_PAGE, self.APP_PAGE, self.ADMIN_PAGE, self.USER_TRANSITION_PAGE, self.IN_NET_PAGE, self.OUT_NET_PAGE, self.BOOLEAN_PAGE, self.SELECT_DIR_PAGE, self.GEN_USER_POLICY_PAGE]
2008-02-13 20:55:23 +00:00
+ self.pages[polgen.LUSER] = [ self.START_PAGE, self.SELECT_TYPE_PAGE, self.APP_PAGE, self.TRANSITION_PAGE, self.IN_NET_PAGE, self.OUT_NET_PAGE, self.BOOLEAN_PAGE, self.SELECT_DIR_PAGE, self.GEN_USER_POLICY_PAGE]
+
+ self.pages[polgen.EUSER] = [ self.START_PAGE, self.SELECT_TYPE_PAGE, self.EXISTING_USER_PAGE, self.TRANSITION_PAGE, self.ROLE_PAGE, self.IN_NET_PAGE, self.OUT_NET_PAGE, self.BOOLEAN_PAGE, self.SELECT_DIR_PAGE, self.GEN_USER_POLICY_PAGE]
+
2007-08-31 19:10:10 +00:00
+ for i in polgen.APPLICATIONS:
2007-12-11 02:47:29 +00:00
+ self.pages[i] = [ self.START_PAGE, self.SELECT_TYPE_PAGE, self.APP_PAGE, self.IN_NET_PAGE, self.OUT_NET_PAGE, self.COMMON_APPS_PAGE, self.FILES_PAGE, self.BOOLEAN_PAGE, self.SELECT_DIR_PAGE, self.GEN_POLICY_PAGE]
+ self.pages[polgen.USER] = [ self.START_PAGE, self.SELECT_TYPE_PAGE, self.APP_PAGE, self.USER_TRANSITION_PAGE, self.IN_NET_PAGE, self.OUT_NET_PAGE, self.COMMON_APPS_PAGE, self.FILES_PAGE, self.BOOLEAN_PAGE, self.SELECT_DIR_PAGE, self.GEN_POLICY_PAGE]
2007-08-31 19:10:10 +00:00
+
2007-08-28 15:45:56 +00:00
+ self.current_page = 0
+ self.back_button.set_sensitive(0)
+
+ self.network_buttons = {}
+
+ self.in_tcp_all_checkbutton = xml.get_widget ("in_tcp_all_checkbutton")
+ self.in_tcp_reserved_checkbutton = xml.get_widget ("in_tcp_reserved_checkbutton")
+ self.in_tcp_unreserved_checkbutton = xml.get_widget ("in_tcp_unreserved_checkbutton")
+ self.in_tcp_entry = self.xml.get_widget("in_tcp_entry")
+ self.network_buttons[self.in_tcp_all_checkbutton] = [ self.in_tcp_reserved_checkbutton, self.in_tcp_unreserved_checkbutton, self.in_tcp_entry ]
+
+
+ self.out_tcp_all_checkbutton = xml.get_widget ("out_tcp_all_checkbutton")
+ self.out_tcp_reserved_checkbutton = xml.get_widget ("out_tcp_reserved_checkbutton")
+ self.out_tcp_unreserved_checkbutton = xml.get_widget ("out_tcp_unreserved_checkbutton")
+ self.out_tcp_entry = self.xml.get_widget("out_tcp_entry")
2007-03-19 14:48:15 +00:00
+
2007-08-28 15:45:56 +00:00
+ self.network_buttons[self.out_tcp_all_checkbutton] = [ self.out_tcp_entry ]
+
+ self.in_udp_all_checkbutton = xml.get_widget ("in_udp_all_checkbutton")
+ self.in_udp_reserved_checkbutton = xml.get_widget ("in_udp_reserved_checkbutton")
+ self.in_udp_unreserved_checkbutton = xml.get_widget ("in_udp_unreserved_checkbutton")
+ self.in_udp_entry = self.xml.get_widget("in_udp_entry")
+
+ self.network_buttons[self.in_udp_all_checkbutton] = [ self.in_udp_reserved_checkbutton, self.in_udp_unreserved_checkbutton, self.in_udp_entry ]
+
+ self.out_udp_all_checkbutton = xml.get_widget ("out_udp_all_checkbutton")
+ self.out_udp_entry = self.xml.get_widget("out_udp_entry")
+ self.network_buttons[self.out_udp_all_checkbutton] = [ self.out_udp_entry ]
+
+ for b in self.network_buttons.keys():
+ b.connect("clicked",self.network_all_clicked)
+
2007-10-17 01:33:45 +00:00
+ self.boolean_treeview = self.xml.get_widget("boolean_treeview")
+ self.boolean_store = gtk.ListStore(gobject.TYPE_STRING,gobject.TYPE_STRING)
+ self.boolean_treeview.set_model(self.boolean_store)
+ self.boolean_store.set_sort_column_id(0, gtk.SORT_ASCENDING)
+ col = gtk.TreeViewColumn(_("Name"), gtk.CellRendererText(), text = 0)
+ self.boolean_treeview.append_column(col)
+ col = gtk.TreeViewColumn(_("Description"), gtk.CellRendererText(), text = 1)
+ self.boolean_treeview.append_column(col)
+
2007-09-10 15:59:05 +00:00
+ self.role_treeview = self.xml.get_widget("role_treeview")
+ self.role_store = gtk.ListStore(gobject.TYPE_STRING)
+ self.role_treeview.set_model(self.role_store)
+ self.role_treeview.get_selection().set_mode(gtk.SELECTION_MULTIPLE)
+ self.role_store.set_sort_column_id(0, gtk.SORT_ASCENDING)
+ col = gtk.TreeViewColumn(_("Role"), gtk.CellRendererText(), text = 0)
+ self.role_treeview.append_column(col)
+
2008-02-13 20:55:23 +00:00
+ self.existing_user_treeview = self.xml.get_widget("existing_user_treeview")
+ self.existing_user_store = gtk.ListStore(gobject.TYPE_STRING)
+ self.existing_user_treeview.set_model(self.existing_user_store)
+ self.existing_user_store.set_sort_column_id(0, gtk.SORT_ASCENDING)
+ col = gtk.TreeViewColumn(_("Existing_User"), gtk.CellRendererText(), text = 0)
+ self.existing_user_treeview.append_column(col)
+
2007-09-10 15:59:05 +00:00
+ roles = commands.getoutput("/usr/bin/seinfo -r").split()[2:]
+ for i in roles:
+ iter = self.role_store.append()
+ self.role_store.set_value(iter, 0, i[:-2])
+
+ self.types = commands.getoutput("/usr/bin/seinfo -t").split()[2:]
2007-10-01 21:45:35 +00:00
+
2007-08-28 15:45:56 +00:00
+ self.transition_treeview = self.xml.get_widget("transition_treeview")
+ self.transition_store = gtk.ListStore(gobject.TYPE_STRING)
+ self.transition_treeview.set_model(self.transition_store)
+ self.transition_treeview.get_selection().set_mode(gtk.SELECTION_MULTIPLE)
+ self.transition_store.set_sort_column_id(0, gtk.SORT_ASCENDING)
+ col = gtk.TreeViewColumn(_("Application"), gtk.CellRendererText(), text = 0)
+ self.transition_treeview.append_column(col)
2007-08-31 19:10:10 +00:00
+
2007-10-01 21:45:35 +00:00
+ self.user_transition_treeview = self.xml.get_widget("user_transition_treeview")
+ self.user_transition_store = gtk.ListStore(gobject.TYPE_STRING)
+ self.user_transition_treeview.set_model(self.user_transition_store)
+ self.user_transition_treeview.get_selection().set_mode(gtk.SELECTION_MULTIPLE)
+ self.user_transition_store.set_sort_column_id(0, gtk.SORT_ASCENDING)
+ col = gtk.TreeViewColumn(_("Application"), gtk.CellRendererText(), text = 0)
+ self.user_transition_treeview.append_column(col)
+
+ for i in polgen.get_users():
+ iter = self.user_transition_store.append()
+ self.user_transition_store.set_value(iter, 0, i)
2008-02-13 20:55:23 +00:00
+ iter = self.existing_user_store.append()
+ self.existing_user_store.set_value(iter, 0, i)
2007-10-01 21:45:35 +00:00
+
2007-08-31 19:10:10 +00:00
+ self.admin_treeview = self.xml.get_widget("admin_treeview")
+ self.admin_store = gtk.ListStore(gobject.TYPE_STRING)
+ self.admin_treeview.set_model(self.admin_store)
+ self.admin_treeview.get_selection().set_mode(gtk.SELECTION_MULTIPLE)
+ self.admin_store.set_sort_column_id(0, gtk.SORT_ASCENDING)
+ col = gtk.TreeViewColumn(_("Application"), gtk.CellRendererText(), text = 0)
+ self.admin_treeview.append_column(col)
+
2007-09-06 12:25:31 +00:00
+ for i in polgen.methods:
2007-08-31 19:10:10 +00:00
+ m = re.findall("(.*)%s" % polgen.USER_TRANSITION_INTERFACE, i)
2007-08-28 19:31:24 +00:00
+ if len(m) > 0:
2008-02-13 20:55:23 +00:00
+ if "%s_exec_t" % m[0] in self.types:
2007-09-10 15:59:05 +00:00
+ iter = self.transition_store.append()
+ self.transition_store.set_value(iter, 0, m[0])
2007-08-31 19:10:10 +00:00
+ continue
+
+ m = re.findall("(.*)%s" % polgen.ADMIN_TRANSITION_INTERFACE, i)
+ if len(m) > 0:
+ iter = self.admin_store.append()
+ self.admin_store.set_value(iter, 0, m[0])
+ continue
+
+ def confine_application(self):
+ return self.get_type() in polgen.APPLICATIONS
2007-08-28 15:45:56 +00:00
+
+ def forward(self, arg):
2007-08-31 19:10:10 +00:00
+ type = self.get_type()
2007-08-28 15:45:56 +00:00
+ if self.current_page == self.START_PAGE:
+ self.back_button.set_sensitive(1)
+
2007-08-31 19:10:10 +00:00
+ if self.pages[type][self.current_page] == self.SELECT_TYPE_PAGE:
+ if self.on_select_type_page_next():
+ return
+
2007-09-19 02:29:47 +00:00
+ if self.pages[type][self.current_page] == self.IN_NET_PAGE:
+ if self.on_in_net_page_next():
+ return
+
+ if self.pages[type][self.current_page] == self.OUT_NET_PAGE:
+ if self.on_out_net_page_next():
+ return
+
2007-08-28 15:45:56 +00:00
+ if self.pages[type][self.current_page] == self.APP_PAGE:
+ if self.on_name_page_next():
+ return
2007-12-11 02:47:29 +00:00
+
2008-02-13 20:55:23 +00:00
+ if self.pages[type][self.current_page] == self.EXISTING_USER_PAGE:
+ if self.on_existing_user_page_next():
+ return
+
2007-12-11 02:47:29 +00:00
+ if self.pages[type][self.current_page] == self.SELECT_DIR_PAGE:
+ outputdir = self.output_entry.get_text()
+ if not os.path.isdir(outputdir):
+ self.error(_("%s must be a directory") % outputdir )
+ return False
2007-08-28 15:45:56 +00:00
+
2007-12-11 02:47:29 +00:00
+ if self.pages[type][self.current_page] in self.finish_page:
2007-08-28 15:45:56 +00:00
+ self.generate_policy()
+ else:
+ self.current_page = self.current_page + 1
+ self.notebook.set_current_page(self.pages[type][self.current_page])
2007-12-11 02:47:29 +00:00
+ if self.pages[type][self.current_page] in self.finish_page:
2007-08-28 15:45:56 +00:00
+ self.forward_button.set_label(gtk.STOCK_APPLY)
+
+ def back(self,arg):
2007-09-06 12:25:31 +00:00
+ type = self.get_type()
2007-12-11 02:47:29 +00:00
+ if self.pages[type][self.current_page] in self.finish_page:
2007-08-28 15:45:56 +00:00
+ self.forward_button.set_label(gtk.STOCK_GO_FORWARD)
+
+ self.current_page = self.current_page - 1
+ self.notebook.set_current_page(self.pages[type][self.current_page])
+ if self.current_page == 0:
+ self.back_button.set_sensitive(0)
+
+ def network_all_clicked(self, button):
+ active = button.get_active()
+ for b in self.network_buttons[button]:
+ b.set_sensitive(not active)
+
2007-03-19 14:48:15 +00:00
+ def verify(self, message, title="" ):
+ dlg = gtk.MessageDialog(None, 0, gtk.MESSAGE_INFO,
+ gtk.BUTTONS_YES_NO,
+ message)
+ dlg.set_title(title)
+ dlg.set_position(gtk.WIN_POS_MOUSE)
+ dlg.show_all()
+ rc = dlg.run()
+ dlg.destroy()
+ return rc
+
+ def info(self, message):
+ dlg = gtk.MessageDialog(None, 0, gtk.MESSAGE_INFO,
+ gtk.BUTTONS_OK,
+ message)
+ dlg.set_position(gtk.WIN_POS_MOUSE)
+ dlg.show_all()
+ dlg.run()
+ dlg.destroy()
+
+ def error(self, message):
+ dlg = gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR,
+ gtk.BUTTONS_CLOSE,
+ message)
+ dlg.set_position(gtk.WIN_POS_MOUSE)
+ dlg.show_all()
+ dlg.run()
+ dlg.destroy()
+
2007-08-28 15:45:56 +00:00
+ def get_name(self):
2008-02-13 20:55:23 +00:00
+ if self.existing_user_radiobutton.get_active():
+ store, iter = self.existing_user_treeview.get_selection().get_selected()
+ if iter == None:
+ raise(_("You must select a user"))
+ return store.get_value(iter, 0)
+ else:
+ return self.name_entry.get_text()
2007-08-28 15:45:56 +00:00
+
2007-04-18 17:18:15 +00:00
+ def get_type(self):
2007-08-31 19:10:10 +00:00
+ if self.cgi_radiobutton.get_active():
+ return polgen.CGI
+ if self.user_radiobutton.get_active():
+ return polgen.USER
+ if self.init_radiobutton.get_active():
+ return polgen.DAEMON
+ if self.inetd_radiobutton.get_active():
+ return polgen.INETD
2008-02-13 20:55:23 +00:00
+ if self.login_user_radiobutton.get_active():
+ return polgen.LUSER
+ if self.admin_user_radiobutton.get_active():
+ return polgen.AUSER
+ if self.xwindows_user_radiobutton.get_active():
2007-08-31 19:10:10 +00:00
+ return polgen.XUSER
2008-02-13 20:55:23 +00:00
+ if self.terminal_user_radiobutton.get_active():
2007-08-31 19:10:10 +00:00
+ return polgen.TUSER
+ if self.root_user_radiobutton.get_active():
+ return polgen.RUSER
2008-02-13 20:55:23 +00:00
+ if self.existing_user_radiobutton.get_active():
+ return polgen.EUSER
2007-09-10 15:59:05 +00:00
+
2007-04-18 17:18:15 +00:00
+ def generate_policy(self, *args):
2007-12-11 02:47:29 +00:00
+ outputdir = self.output_entry.get_text()
2007-03-19 14:48:15 +00:00
+ try:
2007-08-28 15:45:56 +00:00
+ my_policy=polgen.policy(self.get_name(), self.get_type())
+ my_policy.set_in_tcp(self.in_tcp_all_checkbutton.get_active(), self.in_tcp_reserved_checkbutton.get_active(), self.in_tcp_unreserved_checkbutton.get_active(), self.in_tcp_entry.get_text())
+ my_policy.set_in_udp(self.in_udp_all_checkbutton.get_active(), self.in_udp_reserved_checkbutton.get_active(), self.in_udp_unreserved_checkbutton.get_active(), self.in_udp_entry.get_text())
+ my_policy.set_out_tcp(self.out_tcp_all_checkbutton.get_active(), self.out_tcp_entry.get_text())
+ my_policy.set_out_udp(self.out_udp_all_checkbutton.get_active(), self.out_udp_entry.get_text())
2007-10-17 01:33:45 +00:00
+
+ iter= self.boolean_store.get_iter_first()
+ while(iter):
+ my_policy.add_boolean(self.boolean_store.get_value(iter, 0), self.boolean_store.get_value(iter, 1))
+ iter= self.boolean_store.iter_next(iter)
+
2007-08-31 19:10:10 +00:00
+ if self.get_type() in polgen.APPLICATIONS:
2007-08-28 15:45:56 +00:00
+ my_policy.set_program(self.exec_entry.get_text())
+ my_policy.set_use_syslog(self.syslog_checkbutton.get_active() == 1)
+ my_policy.set_use_tmp(self.tmp_checkbutton.get_active() == 1)
+ my_policy.set_use_uid(self.uid_checkbutton.get_active() == 1)
+ my_policy.set_use_pam(self.pam_checkbutton.get_active() == 1)
2007-10-16 23:47:15 +00:00
+
+ my_policy.set_use_dbus(self.dbus_checkbutton.get_active() == 1)
+ my_policy.set_use_audit(self.audit_checkbutton.get_active() == 1)
+ my_policy.set_use_terminal(self.terminal_checkbutton.get_active() == 1)
+ my_policy.set_use_mail(self.mail_checkbutton.get_active() == 1)
2007-09-10 19:45:03 +00:00
+ if self.get_type() is polgen.DAEMON:
+ my_policy.set_init_script(self.init_script_entry.get_text())
2007-10-01 21:45:35 +00:00
+ if self.get_type() == polgen.USER:
+ selected = []
+ self.user_transition_treeview.get_selection().selected_foreach(foreach, selected)
+ my_policy.set_transition_users(selected)
2007-08-28 15:45:56 +00:00
+ else:
2007-08-31 19:10:10 +00:00
+ if self.get_type() == polgen.RUSER:
+ selected = []
+ self.admin_treeview.get_selection().selected_foreach(foreach, selected)
+ my_policy.set_admin_domains(selected)
2008-02-06 15:19:11 +00:00
+ selected = []
+ self.user_transition_treeview.get_selection().selected_foreach(foreach, selected)
+ my_policy.set_transition_users(selected)
2007-08-31 19:10:10 +00:00
+ else:
+ selected = []
+ self.transition_treeview.get_selection().selected_foreach(foreach, selected)
+ my_policy.set_transition_domains(selected)
2007-08-28 15:45:56 +00:00
+
2007-09-10 15:59:05 +00:00
+ selected = []
+ self.role_treeview.get_selection().selected_foreach(foreach, selected)
+ my_policy.set_admin_roles(selected)
+
2007-03-19 14:48:15 +00:00
+ iter= self.store.get_iter_first()
+ while(iter):
+ if self.store.get_value(iter, 1) == FILE:
+ my_policy.add_file(self.store.get_value(iter, 0))
+ else:
+ my_policy.add_dir(self.store.get_value(iter, 0))
+ iter= self.store.iter_next(iter)
+
2007-12-11 02:47:29 +00:00
+ self.info(my_policy.generate(outputdir))
2007-04-18 17:18:15 +00:00
+ return False
2007-03-19 14:48:15 +00:00
+ except ValueError, e:
+ self.error(e.message)
+
+ def delete(self, args):
+ store, iter = self.view.get_selection().get_selected()
+ if iter != None:
+ store.remove(iter)
+ self.view.get_selection().select_path ((0,))
+
2007-10-17 01:33:45 +00:00
+ def delete_boolean(self, args):
+ store, iter = self.boolean_treeview.get_selection().get_selected()
+ if iter != None:
+ store.remove(iter)
+ self.boolean_treeview.get_selection().select_path ((0,))
+
+ def add_boolean(self,type):
+ self.boolean_name_entry.set_text("")
+ self.boolean_description_entry.set_text("")
+ rc = self.boolean_dialog.run()
+ self.boolean_dialog.hide()
+ if rc == gtk.RESPONSE_CANCEL:
+ return
+ iter = self.boolean_store.append()
+ self.boolean_store.set_value(iter, 0, self.boolean_name_entry.get_text())
+ self.boolean_store.set_value(iter, 1, self.boolean_description_entry.get_text())
+
2007-03-19 14:48:15 +00:00
+ def __add(self,type):
+ rc = self.file_dialog.run()
+ self.file_dialog.hide()
+ if rc == gtk.RESPONSE_CANCEL:
+ return
+ for i in self.file_dialog.get_filenames():
+ iter = self.store.append()
+ self.store.set_value(iter, 0, i)
+ self.store.set_value(iter, 1, type)
+
+ def exec_select(self, args):
+ self.file_dialog.set_select_multiple(0)
+ self.file_dialog.set_title(_("Select executable file to be confined."))
2007-10-16 23:47:15 +00:00
+ self.file_dialog.set_action(gtk.FILE_CHOOSER_ACTION_OPEN)
2007-08-31 19:10:10 +00:00
+ self.file_dialog.set_current_folder("/usr/sbin")
2007-03-19 14:48:15 +00:00
+ rc = self.file_dialog.run()
+ self.file_dialog.hide()
+ if rc == gtk.RESPONSE_CANCEL:
+ return
+ self.exec_entry.set_text(self.file_dialog.get_filename())
+
2007-08-31 19:10:10 +00:00
+ def init_script_select(self, args):
+ self.file_dialog.set_select_multiple(0)
+ self.file_dialog.set_title(_("Select init script file to be confined."))
2007-10-16 23:47:15 +00:00
+ self.file_dialog.set_action(gtk.FILE_CHOOSER_ACTION_OPEN)
+ self.file_dialog.set_current_folder("/etc/rc.d/init.d")
2007-08-31 19:10:10 +00:00
+ rc = self.file_dialog.run()
+ self.file_dialog.hide()
+ if rc == gtk.RESPONSE_CANCEL:
+ return
+ self.init_script_entry.set_text(self.file_dialog.get_filename())
+
2007-03-19 14:48:15 +00:00
+ def add(self, args):
+ self.file_dialog.set_title(_("Select file(s) that confined application creates or writes"))
2007-10-16 23:47:15 +00:00
+ self.file_dialog.set_current_folder("/")
2007-04-18 17:18:15 +00:00
+ self.file_dialog.set_action(gtk.FILE_CHOOSER_ACTION_OPEN)
2007-10-16 23:47:15 +00:00
+ self.file_dialog.set_select_multiple(1)
2007-03-19 14:48:15 +00:00
+ self.__add(FILE)
+
+ def add_dir(self, args):
+ self.file_dialog.set_title(_("Select directory(s) that the confined application owns and writes into"))
2007-10-16 23:47:15 +00:00
+ self.file_dialog.set_current_folder("/")
+ self.file_dialog.set_select_multiple(1)
+ self.file_dialog.set_action(gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER)
2007-03-19 14:48:15 +00:00
+ self.__add(DIR)
+
+ def on_about_clicked(self, args):
+ dlg = xml.get_widget ("about_dialog")
+ dlg.run ()
+ dlg.hide ()
+
+ def quit(self, args):
+ gtk.main_quit()
+
+ def setupScreen(self):
+ # Bring in widgets from glade file.
+ self.mainWindow = self.xml.get_widget("main_window")
2007-08-28 15:45:56 +00:00
+ self.druid = self.xml.get_widget("druid")
2007-04-18 17:18:15 +00:00
+ self.type = 0
2007-03-19 14:48:15 +00:00
+ self.name_entry = self.xml.get_widget("name_entry")
2007-10-16 23:47:15 +00:00
+ self.name_entry.connect("focus_out_event",self.on_name_entry_changed)
2007-03-19 14:48:15 +00:00
+ self.exec_entry = self.xml.get_widget("exec_entry")
2007-08-31 19:10:10 +00:00
+ self.exec_button = self.xml.get_widget("exec_button")
+ self.init_script_entry = self.xml.get_widget("init_script_entry")
+ self.init_script_button = self.xml.get_widget("init_script_button")
2007-04-18 17:18:15 +00:00
+ self.output_entry = self.xml.get_widget("output_entry")
+ self.output_entry.set_text(os.getcwd())
+ self.xml.get_widget("output_button").connect("clicked",self.output_button_clicked)
+
2008-02-13 20:55:23 +00:00
+ self.xwindows_user_radiobutton = self.xml.get_widget("xwindows_user_radiobutton")
+ self.terminal_user_radiobutton = self.xml.get_widget("terminal_user_radiobutton")
2007-08-28 15:45:56 +00:00
+ self.root_user_radiobutton = self.xml.get_widget("root_user_radiobutton")
2008-02-13 20:55:23 +00:00
+ self.login_user_radiobutton = self.xml.get_widget("login_user_radiobutton")
+ self.admin_user_radiobutton = self.xml.get_widget("admin_user_radiobutton")
+ self.existing_user_radiobutton = self.xml.get_widget("existing_user_radiobutton")
2007-08-28 15:45:56 +00:00
+
2007-04-18 17:18:15 +00:00
+ self.user_radiobutton = self.xml.get_widget("user_radiobutton")
+ self.init_radiobutton = self.xml.get_widget("init_radiobutton")
+ self.inetd_radiobutton = self.xml.get_widget("inetd_radiobutton")
+ self.cgi_radiobutton = self.xml.get_widget("cgi_radiobutton")
2007-03-19 14:48:15 +00:00
+ self.tmp_checkbutton = self.xml.get_widget("tmp_checkbutton")
+ self.uid_checkbutton = self.xml.get_widget("uid_checkbutton")
2007-03-29 16:16:45 +00:00
+ self.pam_checkbutton = self.xml.get_widget("pam_checkbutton")
2007-10-16 23:47:15 +00:00
+ self.dbus_checkbutton = self.xml.get_widget("dbus_checkbutton")
+ self.audit_checkbutton = self.xml.get_widget("audit_checkbutton")
+ self.terminal_checkbutton = self.xml.get_widget("terminal_checkbutton")
+ self.mail_checkbutton = self.xml.get_widget("mail_checkbutton")
2007-03-29 16:16:45 +00:00
+ self.syslog_checkbutton = self.xml.get_widget("syslog_checkbutton")
2007-03-19 14:48:15 +00:00
+ self.view = self.xml.get_widget("write_treeview")
+ self.file_dialog = self.xml.get_widget("filechooserdialog")
2007-04-18 17:18:15 +00:00
+
2007-03-19 14:48:15 +00:00
+ self.store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_INT)
+ self.view.set_model(self.store)
+ col = gtk.TreeViewColumn("", gtk.CellRendererText(), text = 0)
+ col.set_resizable(True)
+ self.view.append_column(col)
+ self.view.get_selection().select_path ((0,))
+
2007-04-18 17:18:15 +00:00
+ def output_button_clicked(self, *args):
+ self.file_dialog.set_title(_("Select directory to generate policy files in"))
+ self.file_dialog.set_action(gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER)
+ self.file_dialog.set_select_multiple(0)
+ rc = self.file_dialog.run()
+ self.file_dialog.hide()
+ if rc == gtk.RESPONSE_CANCEL:
+ return
+ self.output_entry.set_text(self.file_dialog.get_filename())
+
2007-10-16 23:47:15 +00:00
+ def on_name_entry_changed(self, entry, third):
+ name = entry.get_text()
+ if self.name != name:
+ if name in self.all_types:
+ if self.verify(_("Type %s_t already defined in current policy.\nDo you want to continue?") % name, _("Verify Name")) == gtk.RESPONSE_NO:
+ entry.set_text("")
+ return False
+ if name in self.all_modules:
+ if self.verify(_("Module %s.pp already loaded in current policy.\nDo you want to continue?") % name, _("Verify Name")) == gtk.RESPONSE_NO:
+ entry.set_text("")
+ return False
2008-02-06 15:19:11 +00:00
+
+ file = "/etc/rc.d/init.d/" + name
+ if os.path.isfile(file) and self.init_script_entry.get_text() == "":
+ self.init_script_entry.set_text(file)
+
+ file = "/usr/sbin/" + name
+ if os.path.isfile(file) and self.exec_entry.get_text() == "":
+ self.exec_entry.set_text(file)
+
2007-10-16 23:47:15 +00:00
+ self.name = name
+ return False
+
2007-09-19 02:29:47 +00:00
+ def on_in_net_page_next(self, *args):
+ try:
+ polgen.verify_ports(self.in_tcp_entry.get_text())
+ polgen.verify_ports(self.in_udp_entry.get_text())
+ except ValueError, e:
+ self.error(e.message)
+ return True
+
+ def on_out_net_page_next(self, *args):
+ try:
+ polgen.verify_ports(self.out_tcp_entry.get_text())
+ polgen.verify_ports(self.out_udp_entry.get_text())
+ except ValueError, e:
+ self.error(e.message)
+ return True
+
2007-08-31 19:10:10 +00:00
+ def on_select_type_page_next(self, *args):
+ self.exec_entry.set_sensitive(self.confine_application())
+ self.exec_button.set_sensitive(self.confine_application())
+ self.init_script_entry.set_sensitive(self.init_radiobutton.get_active())
+ self.init_script_button.set_sensitive(self.init_radiobutton.get_active())
+
2008-02-13 20:55:23 +00:00
+ def on_existing_user_page_next(self, *args):
+ store, iter = self.view.get_selection().get_selected()
+ if iter != None:
+ self.error(_("You must select a user"))
+ return True
+
2007-04-18 17:18:15 +00:00
+ def on_name_page_next(self, *args):
+ name=self.name_entry.get_text()
+ if name == "":
+ self.error(_("You must enter a name"))
+ return True
+
2007-08-31 19:10:10 +00:00
+ if self.confine_application():
+ exe = self.exec_entry.get_text()
+ if exe == "":
+ self.error(_("You must enter a executable"))
+ return True
+
2007-03-19 14:48:15 +00:00
+ def stand_alone(self):
+ desktopName = _("Configue SELinux")
2007-02-20 14:57:59 +00:00
+
2007-03-19 14:48:15 +00:00
+ self.setupScreen()
+ self.mainWindow.connect("destroy", self.quit)
2007-02-20 14:57:59 +00:00
+
2007-03-19 14:48:15 +00:00
+ self.mainWindow.show_all()
+ gtk.main()
2007-02-20 14:57:59 +00:00
+
2007-03-19 14:48:15 +00:00
+if __name__ == "__main__":
+ signal.signal (signal.SIGINT, signal.SIG_DFL)
2007-02-20 14:57:59 +00:00
+
2007-03-19 14:48:15 +00:00
+ app = childWindow()
+ app.stand_alone()
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.py policycoreutils-2.0.46/gui/polgen.py
2007-03-19 14:48:15 +00:00
--- nsapolicycoreutils/gui/polgen.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/polgen.py 2008-04-06 08:09:08.000000000 -0400
2008-02-13 20:55:23 +00:00
@@ -0,0 +1,879 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2007, 2008 Red Hat
2007-03-19 14:48:15 +00:00
+# see file 'COPYING' for use and warranty information
+#
+# policygentool is a tool for the initial generation of SELinux policy
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA
+#
+#
2007-08-28 15:45:56 +00:00
+import os, sys, stat
2007-03-19 14:48:15 +00:00
+import re
+from templates import executable
2007-10-17 01:33:45 +00:00
+from templates import boolean
2007-10-16 23:47:15 +00:00
+from templates import etc_rw
2007-03-19 14:48:15 +00:00
+from templates import var_spool
+from templates import var_lib
+from templates import var_log
+from templates import var_run
+from templates import tmp
+from templates import rw
+from templates import network
+from templates import script
2007-08-28 15:45:56 +00:00
+from templates import user
2007-03-19 14:48:15 +00:00
+import seobject
2007-09-06 12:25:31 +00:00
+import sepolgen.interfaces as interfaces
+import sepolgen.defaults as defaults
2007-02-20 14:57:59 +00:00
+
2007-03-19 14:48:15 +00:00
+##
+## I18N
+##
+PROGNAME="system-config-selinux"
2007-02-20 14:57:59 +00:00
+
2007-03-19 14:48:15 +00:00
+import gettext
+gettext.bindtextdomain(PROGNAME, "/usr/share/locale")
+gettext.textdomain(PROGNAME)
+try:
2007-06-11 16:47:29 +00:00
+ gettext.install(PROGNAME,
+ localedir="/usr/share/locale",
+ unicode=False,
+ codeset = 'utf-8')
2007-03-19 14:48:15 +00:00
+except IOError:
+ import __builtin__
+ __builtin__.__dict__['_'] = unicode
2007-02-20 14:57:59 +00:00
+
2007-09-06 12:25:31 +00:00
+methods = []
+fn = defaults.interface_info()
+try:
+ fd = open(fn)
+ # List of per_role_template interfaces
+ ifs = interfaces.InterfaceSet()
+ ifs.from_file(fd)
+ methods = ifs.interfaces.keys()
2007-09-10 15:59:05 +00:00
+ fd.close()
2007-09-06 12:25:31 +00:00
+except:
+ sys.stderr.write("could not open interface info [%s]\n" % fn)
+ sys.exit(1)
+
2007-10-01 21:45:35 +00:00
+def get_users():
+ users = []
+ userdict = seobject.seluserRecords().get_all()
+ for i in userdict.keys():
+ if userdict[i][0] not in users:
+ users.append(userdict[i][0])
+ users.sort()
+ return users
+
2007-09-06 12:25:31 +00:00
+
2007-08-28 15:45:56 +00:00
+ALL = 0
+RESERVED = 1
+UNRESERVED = 2
+PORTS = 3
2007-08-31 19:10:10 +00:00
+ADMIN_TRANSITION_INTERFACE = "_admin$"
+USER_TRANSITION_INTERFACE = "_per_role_template$"
+
+DAEMON = 0
+INETD = 1
+USER = 2
+CGI = 3
+XUSER = 4
+TUSER = 5
2008-02-13 20:55:23 +00:00
+LUSER = 6
+AUSER = 7
+EUSER = 8
+RUSER = 9
+
2007-08-31 19:10:10 +00:00
+APPLICATIONS = [ DAEMON, INETD, USER, CGI ]
2008-02-13 20:55:23 +00:00
+USERS = [ XUSER, TUSER, LUSER, AUSER, EUSER, RUSER]
2007-02-20 14:57:59 +00:00
+
2007-09-19 02:29:47 +00:00
+def verify_ports(ports):
+ if ports == "":
+ return []
+ max_port=2**16
+ try:
+ temp = []
+ for a in ports.split(","):
+ r = a.split("-")
+ if len(r) > 2:
+ raise ValueError
+ if len(r) == 1:
+ begin = int (r[0])
+ end = int (r[0])
+ else:
+ begin = int (r[0])
2007-09-27 19:05:27 +00:00
+ end = int (r[1])
2007-09-19 02:29:47 +00:00
+
+ if begin > end:
+ raise ValueError
+
2007-09-27 19:05:27 +00:00
+ for p in range(begin, end + 1):
+ if p < 1 or p > max_port:
+ raise ValueError
+ temp.append(p)
2007-09-27 15:24:00 +00:00
+ return temp
2007-09-19 02:29:47 +00:00
+ except ValueError:
+ raise ValueError(_("Ports must be be numbers or ranges of numbers from 1 to %d " % max_port ))
+
2007-03-19 14:48:15 +00:00
+class policy:
2007-08-28 15:45:56 +00:00
+
+ def __init__(self, name, type):
2007-03-19 14:48:15 +00:00
+ ports = seobject.portRecords()
2007-10-01 21:45:35 +00:00
+ self.ports = ports.get_all()
+
2007-03-19 14:48:15 +00:00
+ self.DEFAULT_DIRS = {}
2007-04-18 17:18:15 +00:00
+ self.DEFAULT_DIRS["rw"] = ["rw", [], rw];
+ self.DEFAULT_DIRS["tmp"] = ["tmp", [], tmp];
2007-10-16 23:47:15 +00:00
+ self.DEFAULT_DIRS["/etc"] = ["etc_rw", [], etc_rw];
2007-04-18 17:18:15 +00:00
+ self.DEFAULT_DIRS["/var/spool"] = ["var_spool", [], var_spool];
+ self.DEFAULT_DIRS["/var/lib"] = ["var_lib", [], var_lib];
+ self.DEFAULT_DIRS["/var/log"] = ["var_log", [], var_log];
+ self.DEFAULT_DIRS["/var/run"] = ["var_run", [], var_run];
2007-03-19 14:48:15 +00:00
+
2008-02-13 20:55:23 +00:00
+ self.DEFAULT_TYPES = (\
+( self.generate_daemon_types, self.generate_daemon_rules), \
+( self.generate_inetd_types, self.generate_inetd_rules), \
+( self.generate_userapp_types, self.generate_userapp_rules), \
+( self.generate_cgi_types, self.generate_cgi_rules), \
+( self.generate_x_login_user_types, self.generate_x_login_user_rules), \
+( self.generate_min_login_user_types, self.generate_login_user_rules), \
+( self.generate_login_user_types, self.generate_login_user_rules), \
+( self.generate_admin_user_types, self.generate_login_user_rules), \
+( self.generate_existing_user_types, self.generate_existing_user_rules), \
+( self.generate_root_user_types, self.generate_root_user_rules))
2007-03-19 14:48:15 +00:00
+ if name == "":
2008-02-13 20:55:23 +00:00
+ raise ValueError(_("You must enter a name for your confined process/user"))
2007-08-31 19:10:10 +00:00
+ if type == CGI:
2007-03-19 14:48:15 +00:00
+ self.name = "httpd_%s_script" % name
+ else:
+ self.name = name
+ self.file_name = name
2007-08-28 15:45:56 +00:00
+
2007-03-19 14:48:15 +00:00
+ self.type = type
2007-08-31 19:10:10 +00:00
+ self.initscript = ""
2007-08-28 15:45:56 +00:00
+ self.program = ""
+ self.in_tcp = [False, False, False, []]
+ self.in_udp = [False, False, False, []]
+ self.out_tcp = [False, False, False, []]
+ self.out_udp = [False, False, False, []]
2007-03-19 14:48:15 +00:00
+ self.use_tmp = False
+ self.use_uid = False
2007-03-29 16:16:45 +00:00
+ self.use_syslog = False
2007-10-02 20:21:53 +00:00
+ self.use_pam = False
+ self.use_dbus = False
+ self.use_audit = False
+ self.use_terminal = False
+ self.use_mail = False
2007-10-17 01:33:45 +00:00
+ self.booleans = {}
2007-03-19 14:48:15 +00:00
+ self.files = {}
+ self.dirs = {}
+ self.found_tcp_ports=[]
+ self.found_udp_ports=[]
+ self.need_tcp_type=False
+ self.need_udp_type=False
2007-08-31 19:10:10 +00:00
+ self.admin_domains = []
+ self.transition_domains = []
2007-09-06 12:25:31 +00:00
+ self.roles = []
2007-08-28 15:45:56 +00:00
+
+ def __isnetset(self, l):
+ return l[ALL] or l[RESERVED] or l[UNRESERVED] or len(l[PORTS]) > 0
+
2007-08-31 19:10:10 +00:00
+ def set_admin_domains(self, admin_domains):
+ self.admin_domains = admin_domains
+
2007-09-06 12:25:31 +00:00
+ def set_admin_roles(self, roles):
+ self.roles = roles
+
2007-08-31 19:10:10 +00:00
+ def set_transition_domains(self, transition_domains):
+ self.transition_domains = transition_domains
2007-08-28 15:45:56 +00:00
+
2007-10-01 21:45:35 +00:00
+ def set_transition_users(self, transition_users):
+ self.transition_users = transition_users
+
2007-08-28 15:45:56 +00:00
+ def use_in_udp(self):
+ return self.__isnetset(self.in_udp)
+
+ def use_out_udp(self):
+ return self.__isnetset(self.out_udp)
+
+ def use_udp(self):
+ return self.use_in_udp() or self.use_out_udp()
+
+ def use_in_tcp(self):
+ return self.__isnetset(self.in_tcp)
+
+ def use_out_tcp(self):
+ return self.__isnetset(self.out_tcp)
+
+ def use_tcp(self):
+ return self.use_in_tcp() or self.use_out_tcp()
+
+ def use_network(self):
+ return self.use_tcp() or self.use_udp()
+
2007-03-19 14:48:15 +00:00
+ def find_port(self, port):
2007-10-01 21:45:35 +00:00
+ for begin,end in self.ports.keys():
2007-03-19 14:48:15 +00:00
+ if port >= begin and port <= end:
2007-10-01 21:45:35 +00:00
+ return self.ports[begin,end]
2007-03-19 14:48:15 +00:00
+ return None
+
2007-08-28 15:45:56 +00:00
+ def set_program(self, program):
2007-08-31 19:10:10 +00:00
+ if self.type not in APPLICATIONS:
2007-08-28 15:45:56 +00:00
+ raise ValueError(_("USER Types are not allowed executables"))
+
+ self.program = program
+
2007-08-31 19:10:10 +00:00
+ def set_init_script(self, initscript):
+ if self.type != DAEMON:
+ raise ValueError(_("Only DAEMON apps can use an init script"))
+
+ self.initscript = initscript
+
2007-08-28 15:45:56 +00:00
+ def set_in_tcp(self, all, reserved, unreserved, ports):
2007-09-19 02:29:47 +00:00
+ self.in_tcp = [ all, reserved, unreserved, verify_ports(ports)]
2007-03-19 14:48:15 +00:00
+
2007-08-28 15:45:56 +00:00
+ def set_in_udp(self, all, reserved, unreserved, ports):
2007-09-19 02:29:47 +00:00
+ self.in_udp = [ all, reserved, unreserved, verify_ports(ports)]
2007-03-19 14:48:15 +00:00
+
2007-08-28 15:45:56 +00:00
+ def set_out_tcp(self, all, ports):
2007-09-19 02:29:47 +00:00
+ self.out_tcp = [ all , False, False, verify_ports(ports) ]
2007-03-19 14:48:15 +00:00
+
2007-08-28 15:45:56 +00:00
+ def set_out_udp(self, all, ports):
2007-09-19 02:29:47 +00:00
+ self.out_udp = [ all , False, False, verify_ports(ports) ]
2007-03-19 14:48:15 +00:00
+
2007-03-29 16:16:45 +00:00
+ def set_use_syslog(self, val):
+ if val != True and val != False:
+ raise ValueError(_("use_syslog must be a boolean value "))
+
+ self.use_syslog = val
+
+ def set_use_pam(self, val):
2007-08-31 19:10:10 +00:00
+ self.use_pam = val == True
2007-03-29 16:16:45 +00:00
+
2007-10-02 20:21:53 +00:00
+ def set_use_dbus(self, val):
+ self.use_dbus = val == True
+
+ def set_use_audit(self, val):
+ self.use_audit = val == True
+
+ def set_use_terminal(self, val):
+ self.use_terminal = val == True
+
+ def set_use_mail(self, val):
+ self.use_mail = val == True
+
2007-03-19 14:48:15 +00:00
+ def set_use_tmp(self, val):
2007-08-31 19:10:10 +00:00
+ if self.type not in APPLICATIONS:
2007-08-28 15:45:56 +00:00
+ raise ValueError(_("USER Types autoomatically get a tmp type"))
+
2007-08-31 19:10:10 +00:00
+ if val:
2007-04-18 17:18:15 +00:00
+ self.DEFAULT_DIRS["tmp"][1].append("/tmp");
2007-08-31 19:10:10 +00:00
+ else:
2007-04-18 17:18:15 +00:00
+ self.DEFAULT_DIRS["tmp"][1]=[]
2007-03-19 14:48:15 +00:00
+
+ def set_use_uid(self, val):
2007-08-31 19:10:10 +00:00
+ self.use_uid = val == True
2007-03-19 14:48:15 +00:00
+
+ def generate_uid_rules(self):
2007-08-28 15:45:56 +00:00
+ if self.use_uid:
+ return re.sub("TEMPLATETYPE", self.name, executable.te_uid_rules)
+ else:
+ return ""
+
2007-03-29 16:16:45 +00:00
+ def generate_syslog_rules(self):
2007-08-28 15:45:56 +00:00
+ if self.use_syslog:
+ return re.sub("TEMPLATETYPE", self.name, executable.te_syslog_rules)
+ else:
+ return ""
2007-03-29 16:16:45 +00:00
+
+ def generate_pam_rules(self):
2007-08-28 15:45:56 +00:00
+ newte =""
+ if self.use_pam:
+ newte = re.sub("TEMPLATETYPE", self.name, executable.te_pam_rules)
+ return newte
2007-09-06 12:25:31 +00:00
+
2007-10-02 20:21:53 +00:00
+ def generate_audit_rules(self):
+ newte =""
+ if self.use_audit:
+ newte = re.sub("TEMPLATETYPE", self.name, executable.te_audit_rules)
+ return newte
+
+ def generate_dbus_rules(self):
+ newte =""
+ if self.use_dbus:
+ newte = re.sub("TEMPLATETYPE", self.name, executable.te_dbus_rules)
+ return newte
+
+ def generate_mail_rules(self):
+ newte =""
+ if self.use_mail:
+ newte = re.sub("TEMPLATETYPE", self.name, executable.te_mail_rules)
+ return newte
+
2007-09-06 12:25:31 +00:00
+ def generate_network_action(self, protocol, action, port_name):
+ line = ""
+ method = "corenet_%s_%s_%s" % (protocol, action, port_name)
+ if method in methods:
+ line = "%s(%s_t)\n" % (method, self.name)
+ else:
+ line = """
+gen_require(`
+ type %s_t;
+')
+allow %s_t %s_t:%s_socket name_%s;
+""" % (port_name, self.name, port_name, protocol, action)
+ return line
+
2007-03-19 14:48:15 +00:00
+ def generate_network_types(self):
2007-08-28 15:45:56 +00:00
+ for i in self.in_tcp[PORTS]:
2007-03-19 14:48:15 +00:00
+ rec = self.find_port(int(i))
+ if rec == None:
+ self.need_tcp_type = True;
+ else:
+ port_name = rec[0][:-2]
2007-09-06 12:25:31 +00:00
+ line = self.generate_network_action("tcp", "bind", port_name)
+# line = "corenet_tcp_bind_%s(%s_t)\n" % (port_name, self.name)
2007-03-19 14:48:15 +00:00
+ if line not in self.found_tcp_ports:
+ self.found_tcp_ports.append(line)
+
2007-08-28 15:45:56 +00:00
+ for i in self.out_tcp[PORTS]:
2007-03-19 14:48:15 +00:00
+ rec = self.find_port(int(i))
+ if rec == None:
+ self.need_tcp_type = True;
+ else:
+ port_name = rec[0][:-2]
2007-09-06 12:25:31 +00:00
+ line = self.generate_network_action("tcp", "connect", port_name)
+# line = "corenet_tcp_connect_%s(%s_t)\n" % (port_name, self.name)
2007-03-19 14:48:15 +00:00
+ if line not in self.found_tcp_ports:
+ self.found_tcp_ports.append(line)
+
2007-08-28 15:45:56 +00:00
+ for i in self.in_udp[PORTS]:
2007-03-19 14:48:15 +00:00
+ rec = self.find_port(int(i))
+ if rec == None:
+ self.need_udp_type = True;
+ else:
+ port_name = rec[0][:-2]
2007-09-06 12:25:31 +00:00
+ line = self.generate_network_action("udp", "bind", port_name)
+# line = "corenet_udp_bind_%s(%s_t)\n" % (port_name, self.name)
2007-03-19 14:48:15 +00:00
+ if line not in self.found_udp_ports:
+ self.found_udp_ports.append(line)
2007-04-15 01:42:09 +00:00
+
2007-03-19 14:48:15 +00:00
+ if self.need_udp_type == True or self.need_tcp_type == True:
+ return re.sub("TEMPLATETYPE", self.name, network.te_port_types)
+ return ""
+
+ def __find_path(self, file):
+ for d in self.DEFAULT_DIRS:
+ if file.find(d) == 0:
2007-04-18 17:18:15 +00:00
+ self.DEFAULT_DIRS[d][1].append(file)
2007-03-19 14:48:15 +00:00
+ return self.DEFAULT_DIRS[d]
2007-04-18 17:18:15 +00:00
+ self.DEFAULT_DIRS["rw"][1].append(file)
2007-03-19 14:48:15 +00:00
+ return self.DEFAULT_DIRS["rw"]
+
2007-10-17 01:33:45 +00:00
+ def add_boolean(self, name, description):
+ self.booleans[name] = description
+
2007-03-19 14:48:15 +00:00
+ def add_file(self, file):
+ self.files[file] = self.__find_path(file)
+
+ def add_dir(self, file):
+ self.dirs[file] = self.__find_path(file)
+
+ def generate_network_rules(self):
+ newte = ""
2007-08-28 15:45:56 +00:00
+ if self.use_network():
2007-03-19 14:48:15 +00:00
+ newte = "\n"
+
+ newte += re.sub("TEMPLATETYPE", self.name, network.te_network)
+
2007-08-28 15:45:56 +00:00
+ if self.use_tcp():
2007-03-19 14:48:15 +00:00
+ newte += "\n"
+ newte += re.sub("TEMPLATETYPE", self.name, network.te_tcp)
2007-08-28 15:45:56 +00:00
+
+ if self.use_in_tcp():
2007-03-19 14:48:15 +00:00
+ newte += re.sub("TEMPLATETYPE", self.name, network.te_in_tcp)
2007-08-28 15:45:56 +00:00
+
+ if self.need_tcp_type and len(self.in_tcp[PORTS]) > 0:
+ newte += re.sub("TEMPLATETYPE", self.name, network.te_in_need_port_tcp)
+
+ if self.need_tcp_type and len(self.out_tcp[PORTS]) > 0:
+ newte += re.sub("TEMPLATETYPE", self.name, network.te_out_need_port_tcp)
+
+
+ if self.in_tcp[ALL]:
+ newte += re.sub("TEMPLATETYPE", self.name, network.te_in_all_ports_tcp)
+ if self.in_tcp[RESERVED]:
+ newte += re.sub("TEMPLATETYPE", self.name, network.te_in_reserved_ports_tcp)
+ if self.in_tcp[UNRESERVED]:
+ newte += re.sub("TEMPLATETYPE", self.name, network.te_in_unreserved_ports_tcp)
+
+ if self.out_tcp[ALL]:
+ newte += re.sub("TEMPLATETYPE", self.name, network.te_out_all_ports_tcp)
+ if self.out_tcp[RESERVED]:
+ newte += re.sub("TEMPLATETYPE", self.name, network.te_out_reserved_ports_tcp)
+ if self.out_tcp[UNRESERVED]:
+ newte += re.sub("TEMPLATETYPE", self.name, network.te_out_unreserved_ports_tcp)
+
2007-03-19 14:48:15 +00:00
+ for i in self.found_tcp_ports:
+ newte += i
+
2007-08-28 15:45:56 +00:00
+ if self.use_udp():
2007-03-19 14:48:15 +00:00
+ newte += "\n"
+ newte += re.sub("TEMPLATETYPE", self.name, network.te_udp)
2007-08-28 15:45:56 +00:00
+
+ if self.need_udp_type:
2007-03-29 16:16:45 +00:00
+ newte += re.sub("TEMPLATETYPE", self.name, network.te_in_need_port_udp)
2007-08-28 15:45:56 +00:00
+ if self.use_in_udp():
2007-04-15 01:42:09 +00:00
+ newte += re.sub("TEMPLATETYPE", self.name, network.te_in_udp)
2007-08-28 15:45:56 +00:00
+ if self.in_udp[ALL]:
+ newte += re.sub("TEMPLATETYPE", self.name, network.te_in_all_ports_udp)
+ if self.in_udp[RESERVED]:
+ newte += re.sub("TEMPLATETYPE", self.name, network.te_in_reserved_ports_udp)
+ if self.in_udp[UNRESERVED]:
+ newte += re.sub("TEMPLATETYPE", self.name, network.te_in_unreserved_ports_udp)
+
2007-03-19 14:48:15 +00:00
+ for i in self.found_udp_ports:
+ newte += i
+ return newte
+
2007-08-28 15:45:56 +00:00
+ def generate_transition_rules(self):
+ newte = ""
2007-08-31 19:10:10 +00:00
+ for app in self.transition_domains:
2007-08-28 15:45:56 +00:00
+ tmp = re.sub("TEMPLATETYPE", self.name, user.te_transition_rules)
+ newte += re.sub("APPLICATION", app, tmp)
2007-10-01 21:45:35 +00:00
+
+ if self.type == USER:
+ for u in self.transition_users:
+ temp = re.sub("TEMPLATETYPE", self.name, executable.te_userapp_trans_rules)
+ newte += re.sub("USER", u, temp)
+
2007-08-28 15:45:56 +00:00
+ return newte
2007-08-31 19:10:10 +00:00
+
+ def generate_admin_rules(self):
+ newte = ""
2007-09-10 16:19:23 +00:00
+ if self.type == RUSER:
+ newte += re.sub("TEMPLATETYPE", self.name, user.te_admin_rules)
2007-09-06 12:25:31 +00:00
+
2007-09-10 16:19:23 +00:00
+ for app in self.admin_domains:
+ tmp = re.sub("TEMPLATETYPE", self.name, user.te_admin_domain_rules)
+ newte += re.sub("APPLICATION", app, tmp)
2008-02-06 15:19:11 +00:00
+ for u in self.transition_users:
+ tmp = re.sub("TEMPLATETYPE", self.name, user.te_admin_trans_rules)
+ newte += re.sub("USER", u, tmp)
+
2007-08-31 19:10:10 +00:00
+ return newte
+
2007-10-16 23:47:15 +00:00
+ def generate_dbus_if(self):
+ newif =""
+ if self.use_dbus:
+ newif = re.sub("TEMPLATETYPE", self.name, executable.if_dbus_rules)
+ return newif
+
2007-08-31 19:10:10 +00:00
+ def generate_admin_if(self):
+ newif = ""
+ if self.initscript != "":
+ newif += re.sub("TEMPLATETYPE", self.name, executable.if_initscript_admin)
+ for d in self.DEFAULT_DIRS:
+ if len(self.DEFAULT_DIRS[d][1]) > 0:
+ newif += re.sub("TEMPLATETYPE", self.name, self.DEFAULT_DIRS[d][2].if_admin_rules)
+
+ if newif != "":
+ ret = re.sub("TEMPLATETYPE", self.name, executable.if_begin_admin)
+ ret += newif
+ ret += re.sub("TEMPLATETYPE", self.name, executable.if_end_admin)
+ return ret
+
+ return ""
2007-08-28 15:45:56 +00:00
+
2007-03-19 14:48:15 +00:00
+ def generate_cgi_types(self):
2007-08-28 15:45:56 +00:00
+ return re.sub("TEMPLATETYPE", self.file_name, executable.te_cgi_types)
2007-03-19 14:48:15 +00:00
+
+ def generate_userapp_types(self):
2007-08-28 15:45:56 +00:00
+ return re.sub("TEMPLATETYPE", self.name, executable.te_userapp_types)
2007-03-19 14:48:15 +00:00
+
+ def generate_inetd_types(self):
2007-08-28 15:45:56 +00:00
+ return re.sub("TEMPLATETYPE", self.name, executable.te_inetd_types)
+
2008-02-13 20:55:23 +00:00
+ def generate_min_login_user_types(self):
+ return re.sub("TEMPLATETYPE", self.name, user.te_min_login_user_types)
+
2007-08-28 15:45:56 +00:00
+ def generate_login_user_types(self):
+ return re.sub("TEMPLATETYPE", self.name, user.te_login_user_types)
+
2008-02-13 20:55:23 +00:00
+ def generate_admin_user_types(self):
+ return re.sub("TEMPLATETYPE", self.name, user.te_admin_user_types)
+
+ def generate_existing_user_types(self):
+ return re.sub("TEMPLATETYPE", self.name, user.te_existing_user_types)
+
2007-08-28 15:45:56 +00:00
+ def generate_x_login_user_types(self):
+ return re.sub("TEMPLATETYPE", self.name, user.te_x_login_user_types)
+
+ def generate_root_user_types(self):
+ return re.sub("TEMPLATETYPE", self.name, user.te_root_user_types)
2007-03-19 14:48:15 +00:00
+
+ def generate_daemon_types(self):
2007-08-31 19:10:10 +00:00
+ newte = re.sub("TEMPLATETYPE", self.name, executable.te_daemon_types)
+ if self.initscript != "":
+ newte += re.sub("TEMPLATETYPE", self.name, executable.te_initscript_types)
+ return newte
2007-08-28 15:45:56 +00:00
+
+ def generate_tmp_types(self):
+ if self.use_tmp:
+ return re.sub("TEMPLATETYPE", self.name, tmp.te_types)
+ else:
+ return ""
2007-03-19 14:48:15 +00:00
+
2007-10-17 01:33:45 +00:00
+ def generate_booleans(self):
+ newte = ""
+ for b in self.booleans:
+ tmp = re.sub("BOOLEAN", b, boolean.te_boolean)
+ newte += re.sub("DESCRIPTION", self.booleans[b], tmp)
+ return newte
+
+ def generate_boolean_rules(self):
+ newte = ""
+ for b in self.booleans:
+ newte += re.sub("BOOLEAN", b, boolean.te_rules)
+ return newte
+
2007-03-19 14:48:15 +00:00
+ def generate_cgi_te(self):
2007-08-28 15:45:56 +00:00
+ return re.sub("TEMPLATETYPE", self.name, executable.te_cgi_types)
2007-03-19 14:48:15 +00:00
+
+ def generate_daemon_rules(self):
2007-08-31 19:10:10 +00:00
+ newif = re.sub("TEMPLATETYPE", self.name, executable.te_daemon_rules)
+
+ return newif
2007-08-28 15:45:56 +00:00
+
+ def generate_login_user_rules(self):
+ return re.sub("TEMPLATETYPE", self.name, user.te_login_user_rules)
+
2008-02-13 20:55:23 +00:00
+ def generate_existing_user_rules(self):
+ return re.sub("TEMPLATETYPE", self.name, user.te_existing_user_rules)
+
2007-08-28 15:45:56 +00:00
+ def generate_x_login_user_rules(self):
+ return re.sub("TEMPLATETYPE", self.name, user.te_x_login_user_rules)
+
+ def generate_root_user_rules(self):
+ newte =re.sub("TEMPLATETYPE", self.name, user.te_root_user_rules)
2007-03-19 14:48:15 +00:00
+ return newte
+
+ def generate_userapp_rules(self):
2007-08-28 15:45:56 +00:00
+ return re.sub("TEMPLATETYPE", self.name, executable.te_userapp_rules)
2007-03-19 14:48:15 +00:00
+
+ def generate_inetd_rules(self):
2007-08-28 15:45:56 +00:00
+ return re.sub("TEMPLATETYPE", self.name, executable.te_inetd_rules)
+
+ def generate_tmp_rules(self):
+ if self.use_tmp:
+ return re.sub("TEMPLATETYPE", self.name, tmp.te_rules)
+ else:
+ return ""
2007-03-19 14:48:15 +00:00
+
+ def generate_cgi_rules(self):
+ newte = ""
+ newte += re.sub("TEMPLATETYPE", self.name, executable.te_cgi_rules)
+ return newte
+
2007-09-10 19:45:03 +00:00
+ def generate_user_if(self):
2007-10-02 20:21:53 +00:00
+ newif =""
2007-10-18 21:48:15 +00:00
+ if self.use_terminal or self.type == USER:
+ newif = re.sub("TEMPLATETYPE", self.name, executable.if_user_program_rules)
2007-10-02 20:21:53 +00:00
+ return newif
+
2007-09-10 19:45:03 +00:00
+
2007-03-19 14:48:15 +00:00
+ def generate_if(self):
2007-08-31 19:10:10 +00:00
+ newif = ""
2007-09-10 15:59:05 +00:00
+ if self.program != "":
2007-08-31 19:10:10 +00:00
+ newif += re.sub("TEMPLATETYPE", self.name, executable.if_program_rules)
2007-09-10 15:59:05 +00:00
+ if self.initscript != "":
2007-08-31 19:10:10 +00:00
+ newif += re.sub("TEMPLATETYPE", self.name, executable.if_initscript_rules)
2007-03-19 14:48:15 +00:00
+
+ for d in self.DEFAULT_DIRS:
2007-04-24 18:51:20 +00:00
+ if len(self.DEFAULT_DIRS[d][1]) > 0:
2007-03-19 14:48:15 +00:00
+ newif += re.sub("TEMPLATETYPE", self.name, self.DEFAULT_DIRS[d][2].if_rules)
2007-04-18 17:18:15 +00:00
+ for i in self.DEFAULT_DIRS[d][1]:
+ if os.path.exists(i) and stat.S_ISSOCK(os.stat(i)[stat.ST_MODE]):
+ newif += re.sub("TEMPLATETYPE", self.name, self.DEFAULT_DIRS[d][2].if_stream_rules)
+ break
2007-09-10 19:45:03 +00:00
+ newif += self.generate_user_if()
2007-10-16 23:47:15 +00:00
+ newif += self.generate_dbus_if()
2007-08-31 19:10:10 +00:00
+ newif += self.generate_admin_if()
2007-10-02 20:21:53 +00:00
+
2007-03-19 14:48:15 +00:00
+ return newif
+
+ def generate_default_types(self):
+ return self.DEFAULT_TYPES[self.type][0]()
+
+ def generate_default_rules(self):
+ return self.DEFAULT_TYPES[self.type][1]()
+
2007-09-06 12:25:31 +00:00
+ def generate_roles_rules(self):
+ newte = ""
2008-02-13 20:55:23 +00:00
+ if self.type in ( TUSER, XUSER, AUSER, LUSER, EUSER):
2007-09-06 12:25:31 +00:00
+ roles = ""
+ if len(self.roles) > 0:
+ newte += re.sub("TEMPLATETYPE", self.name, user.te_newrole_rules)
+ for role in self.roles:
+ tmp = re.sub("TEMPLATETYPE", self.name, user.te_roles_rules)
+ newte += re.sub("ROLE", role, tmp)
+ return newte
+
2007-03-19 14:48:15 +00:00
+ def generate_te(self):
+ newte = self.generate_default_types()
+ for d in self.DEFAULT_DIRS:
2007-04-18 17:18:15 +00:00
+ if len(self.DEFAULT_DIRS[d][1]) > 0:
2007-03-19 14:48:15 +00:00
+ # CGI scripts already have a rw_t
2007-08-31 19:10:10 +00:00
+ if self.type != CGI or d != "rw":
2007-03-19 14:48:15 +00:00
+ newte += re.sub("TEMPLATETYPE", self.name, self.DEFAULT_DIRS[d][2].te_types)
+
+ newte += self.generate_network_types()
2007-08-28 15:45:56 +00:00
+ newte += self.generate_tmp_types()
2007-10-17 01:33:45 +00:00
+ newte += self.generate_booleans()
2007-03-19 14:48:15 +00:00
+ newte += self.generate_default_rules()
2007-10-17 01:33:45 +00:00
+ newte += self.generate_boolean_rules()
2007-08-28 15:45:56 +00:00
+
2007-03-19 14:48:15 +00:00
+ for d in self.DEFAULT_DIRS:
2007-04-18 17:18:15 +00:00
+ if len(self.DEFAULT_DIRS[d][1]) > 0:
2007-03-19 14:48:15 +00:00
+ newte += re.sub("TEMPLATETYPE", self.name, self.DEFAULT_DIRS[d][2].te_rules)
2007-04-18 17:18:15 +00:00
+ for i in self.DEFAULT_DIRS[d][1]:
+ if os.path.exists(i) and stat.S_ISSOCK(os.stat(i)[stat.ST_MODE]):
+ newte += re.sub("TEMPLATETYPE", self.name, self.DEFAULT_DIRS[d][2].te_stream_rules)
+ break
2007-03-19 14:48:15 +00:00
+
+ newte += self.generate_network_rules()
2007-08-28 15:45:56 +00:00
+ newte += self.generate_tmp_rules()
+ newte += self.generate_uid_rules()
+ newte += self.generate_syslog_rules()
+ newte += self.generate_pam_rules()
2007-10-02 20:21:53 +00:00
+ newte += self.generate_dbus_rules()
+ newte += self.generate_audit_rules()
+ newte += self.generate_mail_rules()
2007-09-06 12:25:31 +00:00
+ newte += self.generate_roles_rules()
2007-08-28 15:45:56 +00:00
+ newte += self.generate_transition_rules()
2007-08-31 19:10:10 +00:00
+ newte += self.generate_admin_rules()
2007-03-19 14:48:15 +00:00
+ return newte
+
+ def generate_fc(self):
+ newfc = ""
2007-08-31 19:10:10 +00:00
+ if self.program == "":
+ raise ValueError(_("You must enter the executable path for your confined process"))
+
+ t1 = re.sub("EXECUTABLE", self.program, executable.fc_program)
2007-03-19 14:48:15 +00:00
+ newfc += re.sub("TEMPLATETYPE", self.name, t1)
+
2007-08-31 19:10:10 +00:00
+ if self.initscript != "":
+ t1 = re.sub("EXECUTABLE", self.initscript, executable.fc_initscript)
+ newfc += re.sub("TEMPLATETYPE", self.name, t1)
+
2007-03-19 14:48:15 +00:00
+ for i in self.files.keys():
2007-04-18 17:18:15 +00:00
+ if os.path.exists(i) and stat.S_ISSOCK(os.stat(i)[stat.ST_MODE]):
+ t1 = re.sub("TEMPLATETYPE", self.name, self.files[i][2].fc_sock_file)
+ else:
+ t1 = re.sub("TEMPLATETYPE", self.name, self.files[i][2].fc_file)
2007-03-19 14:48:15 +00:00
+ t2 = re.sub("FILENAME", i, t1)
+ newfc += re.sub("FILETYPE", self.files[i][0], t2)
+
+ for i in self.dirs.keys():
+ t1 = re.sub("TEMPLATETYPE", self.name, self.dirs[i][2].fc_dir)
+ t2 = re.sub("FILENAME", i, t1)
+ newfc += re.sub("FILETYPE", self.dirs[i][0], t2)
+
+ return newfc
+
2007-09-06 12:25:31 +00:00
+ def generate_user_sh(self):
+ newsh = ""
2008-02-13 20:55:23 +00:00
+ if self.type in ( TUSER, XUSER, AUSER, LUSER, EUSER):
2007-09-06 12:25:31 +00:00
+ roles = ""
+ for role in self.roles:
+ roles += " %s_r" % role
+ if roles != "":
+ roles += " system_r"
+ tmp = re.sub("TEMPLATETYPE", self.name, script.users)
+ newsh += re.sub("ROLES", roles, tmp)
+ return newsh
+
2007-03-19 14:48:15 +00:00
+ def generate_sh(self):
2008-02-13 20:55:23 +00:00
+ temp = re.sub("TEMPLATETYPE", self.file_name, script.compile)
+ if self.type == RUSER:
+ newsh = re.sub("TEMPLATEFILE", "my%s" % self.file_name, temp)
+ else:
+ newsh = re.sub("TEMPLATEFILE", self.file_name, temp)
2007-09-10 15:59:05 +00:00
+ if self.program != "":
+ newsh += re.sub("FILENAME", self.program, script.restorecon)
+ if self.initscript != "":
+ newsh += re.sub("FILENAME", self.initscript, script.restorecon)
2007-03-19 14:48:15 +00:00
+
+ for i in self.files.keys():
+ newsh += re.sub("FILENAME", i, script.restorecon)
+
+ for i in self.dirs.keys():
+ newsh += re.sub("FILENAME", i, script.restorecon)
+
2007-08-28 15:45:56 +00:00
+ for i in self.in_tcp[PORTS] + self.out_tcp[PORTS]:
2007-04-15 01:42:09 +00:00
+ if self.find_port(i) == None:
+ t1 = re.sub("PORTNUM", "%d" % i, script.tcp_ports)
+ newsh += re.sub("TEMPLATETYPE", self.name, t1)
+
2007-08-28 15:45:56 +00:00
+ for i in self.in_udp[PORTS] + self.out_udp[PORTS]:
2007-04-15 01:42:09 +00:00
+ if self.find_port(i) == None:
2007-03-19 14:48:15 +00:00
+ t1 = re.sub("PORTNUM", "%d" % i, script.udp_ports)
+ newsh += re.sub("TEMPLATETYPE", self.name, t1)
2007-09-06 12:25:31 +00:00
+
+ newsh += self.generate_user_sh()
2007-03-19 14:48:15 +00:00
+
+ return newsh
+
2007-04-18 17:18:15 +00:00
+ def write_te(self, out_dir):
2008-02-13 20:55:23 +00:00
+ if self.type == EUSER:
+ tefile = "%s/my%s.te" % (out_dir, self.file_name)
+ else:
+ tefile = "%s/%s.te" % (out_dir, self.file_name)
2007-03-19 14:48:15 +00:00
+ fd = open(tefile, "w")
+ fd.write(self.generate_te())
+ fd.close()
+ return tefile
+
2007-04-18 17:18:15 +00:00
+ def write_sh(self, out_dir):
2008-02-13 20:55:23 +00:00
+ if self.type == EUSER:
+ shfile = "%s/my%s.sh" % (out_dir, self.file_name)
+ else:
+ shfile = "%s/%s.sh" % (out_dir, self.file_name)
2007-03-19 14:48:15 +00:00
+ fd = open(shfile, "w")
+ fd.write(self.generate_sh())
+ fd.close()
2007-10-16 23:47:15 +00:00
+ os.chmod(shfile, 0750)
2007-03-19 14:48:15 +00:00
+ return shfile
+
2007-04-18 17:18:15 +00:00
+ def write_if(self, out_dir):
2008-02-13 20:55:23 +00:00
+ if self.type == EUSER:
+ iffile = "%s/my%s.if" % (out_dir, self.file_name)
+ else:
+ iffile = "%s/%s.if" % (out_dir, self.file_name)
2007-03-19 14:48:15 +00:00
+ fd = open(iffile, "w")
+ fd.write(self.generate_if())
+ fd.close()
+ return iffile
+
2007-04-18 17:18:15 +00:00
+ def write_fc(self,out_dir):
2008-02-13 20:55:23 +00:00
+ if self.type == EUSER:
+ fcfile = "%s/my%s.fc" % (out_dir, self.file_name)
+ else:
+ fcfile = "%s/%s.fc" % (out_dir, self.file_name)
2007-08-31 19:10:10 +00:00
+ if self.type in APPLICATIONS:
2007-08-28 15:45:56 +00:00
+ fd = open(fcfile, "w")
+ fd.write(self.generate_fc())
+ fd.close()
2007-03-19 14:48:15 +00:00
+ return fcfile
+
2007-04-18 17:18:15 +00:00
+ def generate(self, out_dir = "."):
2007-03-19 14:48:15 +00:00
+ out = "Created the following files:\n"
2007-04-18 17:18:15 +00:00
+ out += "%-25s %s\n" % (_("Type Enforcment file"), self.write_te(out_dir))
+ out += "%-25s %s\n" % (_("Interface file"), self.write_if(out_dir))
+ out += "%-25s %s\n" % (_("File Contexts file"), self.write_fc(out_dir))
+ out += "%-25s %s\n" % (_("Setup Script"),self.write_sh(out_dir))
2007-03-19 14:48:15 +00:00
+ return out
+
+def errorExit(error):
+ sys.stderr.write("%s: " % sys.argv[0])
+ sys.stderr.write("%s\n" % error)
+ sys.stderr.flush()
+ sys.exit(1)
+
+
+if __name__ == '__main__':
2007-08-31 19:10:10 +00:00
+ mypolicy = policy("mycgi", CGI)
2007-08-28 15:45:56 +00:00
+ mypolicy.set_program("/var/www/cgi-bin/cgi")
2007-09-19 02:29:47 +00:00
+ mypolicy.set_in_tcp(1, 0, 0, "512, 55000-55000")
2007-08-28 15:45:56 +00:00
+ mypolicy.set_in_udp(1, 0, 0, "1513")
2007-03-19 14:48:15 +00:00
+ mypolicy.set_use_uid(True)
2007-08-31 19:10:10 +00:00
+ mypolicy.set_use_tmp(False)
+ mypolicy.set_use_syslog(True)
+ mypolicy.set_use_pam(True)
+ mypolicy.set_out_tcp(0,"8000")
2007-09-06 12:25:31 +00:00
+ print mypolicy.generate("/var/tmp")
2007-08-31 19:10:10 +00:00
+
+ mypolicy = policy("myuser", USER)
+ mypolicy.set_program("/usr/bin/myuser")
+ mypolicy.set_in_tcp(1, 0, 0, "513")
+ mypolicy.set_in_udp(1, 0, 0, "1513")
+ mypolicy.set_use_uid(True)
+ mypolicy.set_use_tmp(True)
+ mypolicy.set_use_syslog(True)
+ mypolicy.set_use_pam(True)
+ mypolicy.add_file("/var/lib/myuser/myuser.sock")
+ mypolicy.set_out_tcp(0,"8000")
2007-10-01 21:45:35 +00:00
+ mypolicy.set_transition_users(["unconfined", "staff"])
2007-09-06 12:25:31 +00:00
+ print mypolicy.generate("/var/tmp")
2007-08-31 19:10:10 +00:00
+
+
+ mypolicy = policy("myrwho", DAEMON)
+ mypolicy.set_program("/usr/sbin/myrwhod")
+ mypolicy.set_init_script("/etc/init.d/myrwhod")
2007-10-16 23:47:15 +00:00
+ mypolicy.add_dir("/etc/nasd")
2007-08-31 19:10:10 +00:00
+ mypolicy.set_in_tcp(1, 0, 0, "513")
+ mypolicy.set_use_uid(True)
+ mypolicy.set_use_tmp(True)
+ mypolicy.set_use_syslog(True)
+ mypolicy.set_use_pam(True)
+ mypolicy.add_dir("/var/run/myrwho")
+ mypolicy.add_dir("/var/lib/myrwho")
2007-09-06 12:25:31 +00:00
+ print mypolicy.generate("/var/tmp")
2007-08-31 19:10:10 +00:00
+
+ mypolicy = policy("myinetd", INETD)
+ mypolicy.set_program("/usr/bin/mytest")
+ mypolicy.set_in_tcp(1, 0, 0, "513")
+ mypolicy.set_in_udp(1, 0, 0, "1513")
+ mypolicy.set_use_uid(True)
2007-03-19 14:48:15 +00:00
+ mypolicy.set_use_tmp(True)
2007-03-29 16:16:45 +00:00
+ mypolicy.set_use_syslog(True)
+ mypolicy.set_use_pam(True)
2007-04-18 17:18:15 +00:00
+ mypolicy.add_file("/var/lib/mysql/mysql.sock")
+ mypolicy.add_file("/var/run/rpcbind.sock")
2007-03-19 14:48:15 +00:00
+ mypolicy.add_file("/var/run/daemon.pub")
+ mypolicy.add_file("/var/log/daemon.log")
+ mypolicy.add_dir("/var/lib/daemon")
+ mypolicy.add_dir("/etc/daemon")
+ mypolicy.add_dir("/etc/daemon/special")
2007-10-02 20:21:53 +00:00
+ mypolicy.set_use_uid(True)
+ mypolicy.set_use_syslog(True)
+ mypolicy.set_use_pam(True)
+ mypolicy.set_use_audit(True)
+ mypolicy.set_use_dbus(True)
+ mypolicy.set_use_terminal(True)
+ mypolicy.set_use_mail(True)
2007-08-28 15:45:56 +00:00
+ mypolicy.set_out_tcp(0,"8000")
2007-09-06 12:25:31 +00:00
+ print mypolicy.generate("/var/tmp")
2007-08-31 19:10:10 +00:00
+
+ mypolicy = policy("mytuser", TUSER)
2007-09-06 12:25:31 +00:00
+ mypolicy.set_transition_domains(["sudo"])
+ mypolicy.set_admin_roles(["mydbadm"])
2007-10-17 01:33:45 +00:00
+ mypolicy.add_boolean("allow_mytuser_setuid", "Allow mytuser users to run setuid applications")
2007-09-06 12:25:31 +00:00
+ print mypolicy.generate("/var/tmp")
2007-08-31 19:10:10 +00:00
+
+ mypolicy = policy("myxuser", XUSER)
2007-09-27 19:05:27 +00:00
+ mypolicy.set_in_tcp(1, 1, 1, "28920")
2007-08-31 19:10:10 +00:00
+ mypolicy.set_in_udp(0, 0, 1, "1513")
+ mypolicy.set_transition_domains(["mozilla"])
2007-09-06 12:25:31 +00:00
+ print mypolicy.generate("/var/tmp")
2007-08-31 19:10:10 +00:00
+
2007-09-06 12:25:31 +00:00
+ mypolicy = policy("mydbadm", RUSER)
+ mypolicy.set_admin_domains(["postgresql", "mysql"])
+ print mypolicy.generate("/var/tmp")
2007-08-31 19:10:10 +00:00
+
2007-03-19 14:48:15 +00:00
+ sys.exit(0)
+
+
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/portsPage.py policycoreutils-2.0.46/gui/portsPage.py
2007-02-20 14:57:59 +00:00
--- nsapolicycoreutils/gui/portsPage.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/portsPage.py 2008-04-06 08:09:08.000000000 -0400
2007-11-05 21:30:56 +00:00
@@ -0,0 +1,258 @@
2007-02-20 14:57:59 +00:00
+## portsPage.py - show selinux mappings
+## Copyright (C) 2006 Red Hat, Inc.
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+## Author: Dan Walsh
+import string
+import gtk
+import gtk.glade
+import os
+import gobject
+import sys
+import seobject
2007-03-19 14:48:15 +00:00
+import commands
2007-02-20 14:57:59 +00:00
+from semanagePage import *;
+
+##
+## I18N
+##
+PROGNAME = "policycoreutils"
+import gettext
+gettext.bindtextdomain(PROGNAME, "/usr/share/locale")
+gettext.textdomain(PROGNAME)
+TYPE_COL = 0
+PROTOCOL_COL = 1
+MLS_COL = 2
+PORT_COL = 3
+try:
2007-06-11 16:47:29 +00:00
+ gettext.install(PROGNAME,
+ localedir="/usr/share/locale",
+ unicode=False,
+ codeset = 'utf-8')
2007-02-20 14:57:59 +00:00
+except IOError:
+ import __builtin__
+ __builtin__.__dict__['_'] = unicode
+
+class portsPage(semanagePage):
+ def __init__(self, xml):
+ semanagePage.__init__(self, xml, "ports", "Network Port")
2007-10-01 21:45:35 +00:00
+ xml.signal_connect("on_group_clicked", self.on_group_clicked)
+ self.group = False
2007-06-11 16:47:29 +00:00
+ self.ports_filter = xml.get_widget("portsFilterEntry")
+ self.ports_filter.connect("focus_out_event", self.filter_changed)
+ self.ports_filter.connect("activate", self.filter_changed)
2007-02-20 14:57:59 +00:00
+ self.ports_name_entry = xml.get_widget("portsNameEntry")
+ self.ports_protocol_combo = xml.get_widget("portsProtocolCombo")
+ self.ports_number_entry = xml.get_widget("portsNumberEntry")
+ self.ports_mls_entry = xml.get_widget("portsMLSEntry")
+ self.ports_add_button = xml.get_widget("portsAddButton")
+ self.ports_properties_button = xml.get_widget("portsPropertiesButton")
+ self.ports_delete_button = xml.get_widget("portsDeleteButton")
+ liststore = self.ports_protocol_combo.get_model()
+ iter = liststore.get_iter_first()
+ self.ports_protocol_combo.set_active_iter(iter)
+ self.init_store()
+ self.edit = True
+ self.load()
+
2007-06-11 16:47:29 +00:00
+ def filter_changed(self, *arg):
+ filter = arg[0].get_text()
+ if filter != self.filter:
+ if self.edit:
+ self.load(filter)
+ else:
+ self.group_load(filter)
+
2007-02-20 14:57:59 +00:00
+ def init_store(self):
+ self.store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING , gobject.TYPE_STRING)
+ self.view.set_model(self.store)
+ self.store.set_sort_column_id(0, gtk.SORT_ASCENDING)
+
2007-11-05 21:30:56 +00:00
+ self.view.set_search_equal_func(self.search)
2007-02-20 14:57:59 +00:00
+ col = gtk.TreeViewColumn(_("SELinux Port\nType"), gtk.CellRendererText(), text = TYPE_COL)
+ col.set_sort_column_id(TYPE_COL)
+ col.set_resizable(True)
+ self.view.append_column(col)
+ self.store.set_sort_column_id(TYPE_COL, gtk.SORT_ASCENDING)
+
+ col = gtk.TreeViewColumn(_("Protocol"), gtk.CellRendererText(), text = PROTOCOL_COL)
+ col.set_sort_column_id(PROTOCOL_COL)
+ col.set_resizable(True)
+ self.view.append_column(col)
+
+ self.mls_col = gtk.TreeViewColumn(_("MLS/MCS\nLevel"), gtk.CellRendererText(), text = MLS_COL)
+ self.mls_col.set_resizable(True)
+ self.mls_col.set_sort_column_id(MLS_COL)
+ self.view.append_column(self.mls_col)
+
+ col = gtk.TreeViewColumn(_("Port"), gtk.CellRendererText(), text = PORT_COL)
+ col.set_sort_column_id(PORT_COL)
+ col.set_resizable(True)
+ self.view.append_column(col)
2007-03-19 14:48:15 +00:00
+ self.store.set_sort_func(PORT_COL,self.sort_int, "")
2007-02-20 14:57:59 +00:00
+
+ def sort_int(self, treemodel, iter1, iter2, user_data):
+ try:
2007-11-05 21:30:56 +00:00
+ p1 = int(treemodel.get_value(iter1,PORT_COL))
+ p2 = int(treemodel.get_value(iter2,PORT_COL))
2007-02-20 14:57:59 +00:00
+ if p1 > p2:
+ return 1
+ if p1 == p2:
+ return 0
+ return -1
+ except:
+ return 0
+
2007-06-11 16:47:29 +00:00
+ def load(self,filter = ""):
+ self.filter=filter
2007-02-20 14:57:59 +00:00
+ self.port = seobject.portRecords()
2007-10-01 21:45:35 +00:00
+ dict = self.port.get_all(self.local)
2007-02-20 14:57:59 +00:00
+ keys = dict.keys()
+ keys.sort()
+ self.store.clear()
+ for k in keys:
2007-06-11 16:47:29 +00:00
+ if not (self.match(str(k[0]), filter) or self.match(dict[k][0], filter) or self.match(dict[k][1], filter) or self.match(dict[k][2], filter)):
+ continue
2007-02-20 14:57:59 +00:00
+ iter = self.store.append()
+ if k[0] == k[1]:
+ self.store.set_value(iter, PORT_COL, k[0])
+ else:
+ rec = "%s-%s" % k
+ self.store.set_value(iter, PORT_COL, rec)
+ self.store.set_value(iter, TYPE_COL, dict[k][0])
+ self.store.set_value(iter, PROTOCOL_COL, dict[k][1])
+ self.store.set_value(iter, MLS_COL, dict[k][2])
+ self.view.get_selection().select_path ((0,))
+
2007-06-11 16:47:29 +00:00
+ def group_load(self, filter = ""):
+ self.filter=filter
2007-02-20 14:57:59 +00:00
+ self.port = seobject.portRecords()
2007-10-01 21:45:35 +00:00
+ dict = self.port.get_all_by_type(self.local)
2007-02-20 14:57:59 +00:00
+ keys = dict.keys()
+ keys.sort()
+ self.store.clear()
+ for k in keys:
2007-06-11 16:47:29 +00:00
+ ports_string = ", ".join(dict[k])
+ if not (self.match(ports_string, filter) or self.match(k[0], filter) or self.match(k[1], filter) ):
+ continue
2007-02-20 14:57:59 +00:00
+ iter = self.store.append()
+ self.store.set_value(iter, TYPE_COL, k[0])
+ self.store.set_value(iter, PROTOCOL_COL, k[1])
2007-06-11 16:47:29 +00:00
+ self.store.set_value(iter, PORT_COL, ports_string)
2007-02-20 14:57:59 +00:00
+ self.store.set_value(iter, MLS_COL, "")
+ self.view.get_selection().select_path ((0,))
+
+ def propertiesDialog(self):
+ if self.edit:
+ semanagePage.propertiesDialog(self)
+
+ def dialogInit(self):
+ store, iter = self.view.get_selection().get_selected()
+ self.ports_number_entry.set_text(store.get_value(iter, PORT_COL))
+ self.ports_number_entry.set_sensitive(False)
+ self.ports_protocol_combo.set_sensitive(False)
+ self.ports_name_entry.set_text(store.get_value(iter, TYPE_COL))
+ self.ports_mls_entry.set_text(store.get_value(iter, MLS_COL))
+ protocol = store.get_value(iter, PROTOCOL_COL)
+ liststore = self.ports_protocol_combo.get_model()
+ iter = liststore.get_iter_first()
+ while iter != None and liststore.get_value(iter,0) != protocol:
+ iter = liststore.iter_next(iter)
+ if iter != None:
+ self.ports_protocol_combo.set_active_iter(iter)
+
+ def dialogClear(self):
+ self.ports_number_entry.set_text("")
+ self.ports_number_entry.set_sensitive(True)
+ self.ports_protocol_combo.set_sensitive(True)
+ self.ports_name_entry.set_text("")
+ self.ports_mls_entry.set_text("s0")
+
+ def delete(self):
+ store, iter = self.view.get_selection().get_selected()
+ port = store.get_value(iter, PORT_COL)
+ protocol = store.get_value(iter, 1)
+ try:
2007-11-05 21:30:56 +00:00
+ self.wait()
2007-03-19 14:48:15 +00:00
+ (rc, out) = commands.getstatusoutput("semanage port -d -p %s %s" % (protocol, port))
2007-11-05 21:30:56 +00:00
+ self.ready()
2007-03-19 14:48:15 +00:00
+ if rc != 0:
+ return self.error(out)
2007-02-20 14:57:59 +00:00
+ store.remove(iter)
+ self.view.get_selection().select_path ((0,))
+ except ValueError, e:
+ self.error(e.args[0])
+
+ def add(self):
+ target = self.ports_name_entry.get_text().strip()
+ mls = self.ports_mls_entry.get_text().strip()
+ port_number = self.ports_number_entry.get_text().strip()
+ if port_number == "":
+ port_number = "1"
2007-03-19 14:48:15 +00:00
+ if not port_number.isdigit():
+ self.error(_("Port number \"%s\" is not valid. 0 < PORT_NUMBER < 65536 ") % port_number )
+ return False
2007-02-20 14:57:59 +00:00
+ list_model = self.ports_protocol_combo.get_model()
+ iter = self.ports_protocol_combo.get_active_iter()
+ protocol = list_model.get_value(iter,0)
2007-11-05 21:30:56 +00:00
+ self.wait()
2007-03-19 14:48:15 +00:00
+ (rc, out) = commands.getstatusoutput("semanage port -a -p %s -r %s -t %s %s" % (protocol, mls, target, port_number))
2007-11-05 21:30:56 +00:00
+ self.ready()
2007-03-19 14:48:15 +00:00
+ if rc != 0:
+ self.error(out)
+ return False
2007-02-20 14:57:59 +00:00
+ iter = self.store.append()
2007-03-19 14:48:15 +00:00
+
2007-02-20 14:57:59 +00:00
+ self.store.set_value(iter, TYPE_COL, target)
+ self.store.set_value(iter, PORT_COL, port_number)
+ self.store.set_value(iter, PROTOCOL_COL, protocol)
+ self.store.set_value(iter, MLS_COL, mls)
+
+ def modify(self):
+ target = self.ports_name_entry.get_text().strip()
+ mls = self.ports_mls_entry.get_text().strip()
+ port_number = self.ports_number_entry.get_text().strip()
+ list_model = self.ports_protocol_combo.get_model()
+ iter = self.ports_protocol_combo.get_active_iter()
+ protocol = list_model.get_value(iter,0)
2007-11-05 21:30:56 +00:00
+ self.wait()
2007-03-19 14:48:15 +00:00
+ (rc, out) = commands.getstatusoutput("semanage port -m -p %s -r %s -t %s %s" % (protocol, mls, target, port_number))
2007-11-05 21:30:56 +00:00
+ self.ready()
2007-03-19 14:48:15 +00:00
+ if rc != 0:
+ self.error(out)
+ return False
2007-02-20 14:57:59 +00:00
+ store, iter = self.view.get_selection().get_selected()
+ self.store.set_value(iter, TYPE_COL, target)
+ self.store.set_value(iter, PORT_COL, port_number)
+ self.store.set_value(iter, PROTOCOL_COL, protocol)
+ self.store.set_value(iter, MLS_COL, mls)
+
2007-10-01 21:45:35 +00:00
+ def on_group_clicked(self, button):
+ self.ports_add_button.set_sensitive(self.group)
+ self.ports_properties_button.set_sensitive(self.group)
+ self.ports_delete_button.set_sensitive(self.group)
+ self.mls_col.set_visible(self.group)
2007-02-20 14:57:59 +00:00
+
2007-10-01 21:45:35 +00:00
+ self.group = not self.group
+ if self.group:
+ button.set_label(_("List View"))
+ self.group_load(self.filter)
+ else:
+ button.set_label(_("Group View"))
+ self.load(self.filter)
+
+ return True
+
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/selinux.tbl policycoreutils-2.0.46/gui/selinux.tbl
2007-02-20 14:57:59 +00:00
--- nsapolicycoreutils/gui/selinux.tbl 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/selinux.tbl 2008-04-06 08:09:33.000000000 -0400
2007-11-15 16:02:26 +00:00
@@ -0,0 +1,234 @@
2007-02-20 14:57:59 +00:00
+acct_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for acct daemon")
2007-07-31 19:39:20 +00:00
+allow_daemons_dump_core _("Admin") _("Allow all daemons to write corefiles to /")
+allow_daemons_use_tty _("Admin") _("Allow all daemons the ability to use unallocated ttys")
2008-04-08 13:54:34 +00:00
+allow_gadmin_exec_content _("User Privs") _("Allow gadmin SELinux user account to execute files in home directory or /tmp")
+allow_guest_exec_content _("User Privs") _("Allow guest SELinux user account to execute files in home directory or /tmp")
2007-02-20 14:57:59 +00:00
+allow_java_execstack _("Memory Protection") _("Allow java executable stack")
+allow_mount_anyfile _("Mount") _("Allow mount to mount any file")
2007-07-31 19:39:20 +00:00
+allow_mounton_anydir _("Mount") _("Allow mount to mount any directory")
2007-02-20 14:57:59 +00:00
+allow_mplayer_execstack _("Memory Protection") _("Allow mplayer executable stack")
+allow_ssh_keysign _("SSH") _("Allow ssh to run ssh-keysign")
2008-04-08 13:54:34 +00:00
+allow_staff_exec_content _("User Privs") _("Allow staff SELinux user account to execute files in home directory or /tmp")
+allow_sysadm_exec_content _("User Privs") _("Allow sysadm SELinux user account to execute files in home directory or /tmp")
+allow_unconfined_exec_content _("User Privs") _("Allow unconfined SELinux user account to execute files in home directory or /tmp")
2007-07-27 19:10:57 +00:00
+allow_unlabeled_packets _("Network Configuration") _("Allow unlabeled packets to flow on the network")
2008-04-08 13:54:34 +00:00
+allow_user_exec_content _("User Privs") _("Allow user SELinux user account to execute files in home directory or /tmp")
2007-02-20 14:57:59 +00:00
+allow_unconfined_execmem_dyntrans _("Memory Protection") _("Allow unconfined to dyntrans to unconfined_execmem")
+allow_user_mysql_connect _("Databases") _("Allow user to connect to mysql socket")
+allow_user_postgresql_connect _("Databases") _("Allow user to connect to postgres socket")
+allow_write_xshm _("XServer") _("Allow clients to write to X shared memory")
2008-04-08 13:54:34 +00:00
+allow_xguest_exec_content _("User Privs") _("Allow xguest SELinux user account to execute files in home directory or /tmp")
2007-02-20 14:57:59 +00:00
+allow_ypbind _("NIS") _("Allow daemons to run with NIS")
2007-07-27 19:10:57 +00:00
+browser_confine_staff _("Web Applications") _("Transition staff SELinux user to Web Browser Domain")
+browser_confine_sysadm _("Web Applications") _("Transition sysadm SELinux user to Web Browser Domain")
+browser_confine_user _("Web Applications") _("Transition user SELinux user to Web Browser Domain")
+browser_confine_xguest _("Web Applications") _("Transition xguest SELinux user to Web Browser Domain")
+browser_write_staff_data _("Web Applications") _("Allow staff Web Browsers to write to home directories")
+browser_write_sysadm_data _("Web Applications") _("Allow staff Web Browsers to write to home directories")
+browser_write_user_data _("Web Applications") _("Allow staff Web Browsers to write to home directories")
+browser_write_xguest_data _("Web Applications") _("Allow staff Web Browsers to write to home directories")
2007-02-20 14:57:59 +00:00
+amanda_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for amanda")
+amavis_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for amavis")
+apmd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for apmd daemon")
+arpwatch_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for arpwatch daemon")
+auditd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for auditd daemon")
+automount_disable_trans _("Mount") _("Disable SELinux protection for automount daemon")
+avahi_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for avahi")
+bluetooth_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for bluetooth daemon")
+canna_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for canna daemon")
+cardmgr_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for cardmgr daemon")
+ccs_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for Cluster Server")
+cdrecord_read_content _("User Privs") _("Allow cdrecord to read various content. nfs, samba, removable devices, user temp and untrusted content files")
+ciped_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for ciped daemon")
+clamd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for clamd daemon")
+clamscan_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for clamscan")
+clvmd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for clvmd")
+comsat_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for comsat daemon")
+courier_authdaemon_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for courier daemon")
+courier_pcp_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for courier daemon")
+courier_pop_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for courier daemon")
+courier_sqwebmail_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for courier daemon")
+courier_tcpd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for courier daemon")
+cpucontrol_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for cpucontrol daemon")
+cpuspeed_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for cpuspeed daemon")
+crond_disable_trans _("Cron") _("Disable SELinux protection for crond daemon")
2007-09-24 16:22:03 +00:00
+cupsd_config_disable_trans _("Printing") _("Disable SELinux protection for cupsd back end server")
2007-02-20 14:57:59 +00:00
+cupsd_disable_trans _("Printing") _("Disable SELinux protection for cupsd daemon")
+cupsd_lpd_disable_trans _("Printing") _("Disable SELinux protection for cupsd_lpd")
+cvs_disable_trans _("CVS") _("Disable SELinux protection for cvs daemon")
+cyrus_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for cyrus daemon")
+dbskkd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for dbskkd daemon")
+dbusd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for dbusd daemon")
+dccd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for dccd")
+dccifd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for dccifd")
+dccm_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for dccm")
+ddt_client_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for ddt daemon")
+devfsd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for devfsd daemon")
+dhcpc_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for dhcpc daemon")
+dhcpd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for dhcpd daemon")
+dictd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for dictd daemon")
+direct_sysadm_daemon _("Admin") _("Allow sysadm_t to directly start daemons")
+disable_evolution_trans _("Web Applications") _("Disable SELinux protection for Evolution")
+disable_games_trans _("Games") _("Disable SELinux protection for games")
+disable_mozilla_trans _("Web Applications") _("Disable SELinux protection for the web browsers")
+disable_thunderbird_trans _("Web Applications") _("Disable SELinux protection for Thunderbird")
+distccd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for distccd daemon")
+dmesg_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for dmesg daemon")
+dnsmasq_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for dnsmasq daemon")
+dovecot_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for dovecot daemon")
+entropyd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for entropyd daemon")
+fetchmail_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for fetchmail")
+fingerd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for fingerd daemon")
+freshclam_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for freshclam daemon")
+fsdaemon_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for fsdaemon daemon")
+gpm_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for gpm daemon")
+gssd_disable_trans _("NFS") _("Disable SELinux protection for gss daemon")
2007-09-24 16:22:03 +00:00
+hald_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for Hal daemon")
2007-02-20 14:57:59 +00:00
+hide_broken_symptoms _("Compatibility") _("Do not audit things that we know to be broken but which are not security risks")
+hostname_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for hostname daemon")
+hotplug_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for hotplug daemon")
+howl_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for howl daemon")
+hplip_disable_trans _("Printing") _("Disable SELinux protection for cups hplip daemon")
+httpd_rotatelogs_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for httpd rotatelogs")
+httpd_suexec_disable_trans _("HTTPD Service") _("Disable SELinux protection for http suexec")
+hwclock_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for hwclock daemon")
+i18n_input_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for i18n daemon")
+imazesrv_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for imazesrv daemon")
+inetd_child_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for inetd child daemons")
+inetd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for inetd daemon")
+innd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for innd daemon")
+iptables_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for iptables daemon")
+ircd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for ircd daemon")
+irqbalance_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for irqbalance daemon")
+iscsid_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for iscsi daemon")
+jabberd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for jabberd daemon")
+kadmind_disable_trans _("Kerberos") _("Disable SELinux protection for kadmind daemon")
+klogd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for klogd daemon")
+krb5kdc_disable_trans _("Kerberos") _("Disable SELinux protection for krb5kdc daemon")
+ktalkd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for ktalk daemons")
+kudzu_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for kudzu daemon")
+locate_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for locate daemon")
+lpd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for lpd daemon")
+lrrd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for lrrd daemon")
+lvm_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for lvm daemon")
+mailman_mail_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for mailman")
+mail_read_content _("Web Applications") _("Allow evolution and thunderbird to read user files")
+mdadm_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for mdadm daemon")
+monopd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for monopd daemon")
+mozilla_read_content _("Web Applications") _("Allow the mozilla browser to read user files")
+mrtg_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for mrtg daemon")
+mysqld_disable_trans _("Databases") _("Disable SELinux protection for mysqld daemon")
+nagios_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for nagios daemon")
+named_disable_trans _("Name Service") _("Disable SELinux protection for named daemon")
+nessusd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for nessusd daemon")
+NetworkManager_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for NetworkManager")
+nfsd_disable_trans _("NFS") _("Disable SELinux protection for nfsd daemon")
+nmbd_disable_trans _("Samba") _("Disable SELinux protection for nmbd daemon")
+nrpe_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for nrpe daemon")
+nscd_disable_trans _("Name Service") _("Disable SELinux protection for nscd daemon")
+nsd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for nsd daemon")
+ntpd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for ntpd daemon")
+oddjob_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for oddjob")
+oddjob_mkhomedir_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for oddjob_mkhomedir")
+openvpn_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for openvpn daemon")
+pam_console_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for pam daemon")
+pegasus_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for pegasus")
+perdition_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for perdition daemon")
+portmap_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for portmap daemon")
+portslave_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for portslave daemon")
+postfix_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for postfix")
+postgresql_disable_trans _("Databases") _("Disable SELinux protection for postgresql daemon")
2007-07-31 19:39:20 +00:00
+pppd_for_user _("pppd") _("Allow pppd to be run for a regular user")
2007-02-20 14:57:59 +00:00
+pptp_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for pptp")
+prelink_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for prelink daemon")
+privoxy_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for privoxy daemon")
+ptal_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for ptal daemon")
+pxe_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for pxe daemon")
+pyzord_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for pyzord")
+quota_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for quota daemon")
+radiusd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for radiusd daemon")
+radvd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for radvd daemon")
+rdisc_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for rdisc")
+readahead_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for readahead")
+read_default_t _("Admin") _("Allow programs to read files in non-standard locations (default_t)")
+restorecond_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for restorecond")
+rhgb_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for rhgb daemon")
+ricci_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for ricci")
+ricci_modclusterd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for ricci_modclusterd")
+rlogind_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for rlogind daemon")
+rpcd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for rpcd daemon")
+rshd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for rshd")
+rsync_disable_trans _("rsync") _("Disable SELinux protection for rsync daemon")
+run_ssh_inetd _("SSH") _("Allow ssh to run from inetd instead of as a daemon")
+samba_share_nfs _("Samba") _("Allow Samba to share nfs directories")
2007-03-13 00:48:19 +00:00
+allow_saslauthd_read_shadow _("SASL authentication server") _("Allow sasl authentication server to read /etc/shadow")
2007-07-31 19:39:20 +00:00
+allow_xserver_execmem _("XServer") _("Allow X-Windows server to map a memory region as both executable and writable")
2007-03-13 00:48:19 +00:00
+saslauthd_disable_trans _("SASL authentication server") _("Disable SELinux protection for saslauthd daemon")
2007-02-20 14:57:59 +00:00
+scannerdaemon_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for scannerdaemon daemon")
+secure_mode _("Admin") _("Do not allow transition to sysadm_t, sudo and su effected")
+secure_mode_insmod _("Admin") _("Do not allow any processes to load kernel modules")
+secure_mode_policyload _("Admin") _("Do not allow any processes to modify kernel SELinux policy")
+sendmail_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for sendmail daemon")
+setrans_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for setrans")
2007-09-24 16:22:03 +00:00
+setroubleshootd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for setroubleshoot daemon")
2007-02-20 14:57:59 +00:00
+slapd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for slapd daemon")
+slrnpull_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for slrnpull daemon")
+smbd_disable_trans _("Samba") _("Disable SELinux protection for smbd daemon")
+snmpd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for snmpd daemon")
+snort_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for snort daemon")
+soundd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for soundd daemon")
+sound_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for sound daemon")
2007-09-24 16:22:03 +00:00
+spamd_disable_trans _("Spam Protection") _("Disable SELinux protection for spamd daemon")
+spamd_enable_home_dirs _("Spam Protection") _("Allow spamd to access home directories")
+spamassassin_can_network _("Spam Protection") _("Allow Spam Assassin daemon network access")
2007-02-20 14:57:59 +00:00
+speedmgmt_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for speedmgmt daemon")
+squid_connect_any _("Squid") _("Allow squid daemon to connect to the network")
+squid_disable_trans _("Squid") _("Disable SELinux protection for squid daemon")
+ssh_keygen_disable_trans _("SSH") _("Disable SELinux protection for ssh daemon")
+ssh_sysadm_login _("SSH") _("Allow ssh logins as sysadm_r:sysadm_t")
+staff_read_sysadm_file _("Admin") _("Allow staff_r users to search the sysadm home dir and read files (such as ~/.bashrc)")
+stunnel_disable_trans _("Universal SSL tunnel") _("Disable SELinux protection for stunnel daemon")
+stunnel_is_daemon _("Universal SSL tunnel") _("Allow stunnel daemon to run as standalone, outside of xinetd")
+swat_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for swat daemon")
+sxid_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for sxid daemon")
+syslogd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for syslogd daemon")
+system_crond_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for system cron jobs")
+tcpd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for tcp daemon")
+telnetd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for telnet daemon")
+tftpd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for tftpd daemon")
+transproxy_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for transproxy daemon")
+udev_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for udev daemon")
+uml_switch_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for uml daemon")
2007-07-31 19:39:20 +00:00
+unlimitedInetd _("Admin") _("Allow xinetd to run unconfined, including any services it starts that do not have a domain transition explicitly defined")
+unlimitedRC _("Admin") _("Allow rc scripts to run unconfined, including any daemon started by an rc script that does not have a domain transition explicitly defined")
+unlimitedRPM _("Admin") _("Allow rpm to run unconfined")
+unlimitedUtils _("Admin") _("Allow privileged utilities like hotplug and insmod to run unconfined")
2007-02-20 14:57:59 +00:00
+updfstab_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for updfstab daemon")
+uptimed_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for uptimed daemon")
2007-07-31 19:39:20 +00:00
+user_canbe_sysadm _("User Privs") _("Allow user_r to reach sysadm_r via su, sudo, or userhelper. Otherwise, only staff_r can do so")
2007-02-20 14:57:59 +00:00
+user_can_mount _("Mount") _("Allow users to execute the mount command")
+user_direct_mouse _("User Privs") _("Allow regular users direct mouse access (only allow the X server)")
+user_dmesg _("User Privs") _("Allow users to run the dmesg command")
+user_net_control _("User Privs") _("Allow users to control network interfaces (also needs USERCTL=true)")
+user_ping _("User Privs") _("Allow normal user to execute ping")
+user_rw_noexattrfile _("User Privs") _("Allow user to r/w noextattrfile (FAT, CDROM, FLOPPY)")
+user_rw_usb _("User Privs") _("Allow users to rw usb devices")
+user_tcp_server _("User Privs") _("Allow users to run TCP servers (bind to ports and accept connection from the same domain and outside users) disabling this forces FTP passive mode and may change other protocols")
+user_ttyfile_stat _("User Privs") _("Allow user to stat ttyfiles")
+uucpd_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for uucpd daemon")
+vmware_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for vmware daemon")
+watchdog_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for watchdog daemon")
+winbind_disable_trans _("Samba") _("Disable SELinux protection for winbind daemon")
+xdm_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for xdm daemon")
+xdm_sysadm_login _("XServer") _("Allow xdm logins as sysadm_r:sysadm_t")
+xend_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for xen daemon")
+xen_use_raw_disk _("XEN") _("Allow xen to read/write physical disk devices")
+xfs_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for xfs daemon")
2007-09-24 16:22:03 +00:00
+xm_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for xen control")
2007-02-20 14:57:59 +00:00
+ypbind_disable_trans _("NIS") _("Disable SELinux protection for ypbind daemon")
+yppasswdd_disable_trans _("NIS") _("Disable SELinux protection for NIS Password Daemon")
+ypserv_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for ypserv daemon")
+ypxfr_disable_trans _("NIS") _("Disable SELinux protection for NIS Transfer Daemon")
2007-09-24 16:22:03 +00:00
+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")
2007-04-09 14:15:34 +00:00
+
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/semanagePage.py policycoreutils-2.0.46/gui/semanagePage.py
2007-02-20 14:57:59 +00:00
--- nsapolicycoreutils/gui/semanagePage.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/semanagePage.py 2008-04-06 08:09:08.000000000 -0400
2007-11-05 21:30:56 +00:00
@@ -0,0 +1,170 @@
2007-02-20 14:57:59 +00:00
+## semanagePage.py - show selinux mappings
+## Copyright (C) 2006 Red Hat, Inc.
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+## Author: Dan Walsh
+import string
+import gtk
+import gtk.glade
+import os
+import gobject
+import sys
+import seobject
+
+##
+## I18N
+##
+PROGNAME="policycoreutils"
+import gettext
+gettext.bindtextdomain(PROGNAME, "/usr/share/locale")
+gettext.textdomain(PROGNAME)
+try:
2007-06-11 16:47:29 +00:00
+ gettext.install(PROGNAME,
+ localedir="/usr/share/locale",
+ unicode=False,
+ codeset = 'utf-8')
2007-02-20 14:57:59 +00:00
+except IOError:
+ import __builtin__
+ __builtin__.__dict__['_'] = unicode
+
2007-11-05 21:30:56 +00:00
+def idle_func():
+ while gtk.events_pending():
+ gtk.main_iteration()
+
2007-02-20 14:57:59 +00:00
+class semanagePage:
+ def __init__(self, xml, name, description):
+ self.xml = xml
2007-11-05 21:30:56 +00:00
+ 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)
+
2007-09-24 16:22:03 +00:00
+ self.local = False
2007-02-20 14:57:59 +00:00
+ self.view = xml.get_widget("%sView" % name)
+ self.dialog = xml.get_widget("%sDialog" % name)
2007-06-13 20:59:11 +00:00
+ self.filter_entry = xml.get_widget("%sFilterEntry" % name )
+ self.filter_entry.connect("focus_out_event", self.filter_changed)
+ self.filter_entry.connect("activate", self.filter_changed)
+
2007-02-20 14:57:59 +00:00
+ self.view.connect("row_activated", self.rowActivated)
+ self.view.get_selection().connect("changed", self.itemSelected)
+ self.description = description;
+
2007-11-05 21:30:56 +00:00
+ def wait(self):
+ self.window.set_cursor(self.busy_cursor)
+ idle_func()
+
+ def ready(self):
+ self.window.set_cursor(self.ready_cursor)
+ idle_func()
+
2007-02-20 14:57:59 +00:00
+ def get_description(self):
+ return self.description
+
+ def itemSelected(self, args):
+ return
+
2007-06-11 16:47:29 +00:00
+ def filter_changed(self, *arg):
+ filter = arg[0].get_text()
+ if filter != self.filter:
+ self.load(filter)
+
2007-11-05 21:30:56 +00:00
+ 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
+
2007-06-11 16:47:29 +00:00
+ def match(self, target, filter):
+ try:
+ f=filter.lower()
+ t=target.lower()
+ if t.find(f) >= 0:
+ return True
+ except:
+ pass
+ return False
+
2007-02-20 14:57:59 +00:00
+ def rowActivated(self, view, row, Column):
+ self.propertiesDialog()
+
+ def verify(self, message, title="" ):
+ dlg = gtk.MessageDialog(None, 0, gtk.MESSAGE_INFO,
+ gtk.BUTTONS_YES_NO,
+ message)
+ dlg.set_title(title)
+ dlg.set_position(gtk.WIN_POS_MOUSE)
+ dlg.show_all()
+ rc = dlg.run()
+ dlg.destroy()
+ return rc
+
+ def error(self, message):
+ dlg = gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR,
+ gtk.BUTTONS_CLOSE,
+ message)
+ dlg.set_position(gtk.WIN_POS_MOUSE)
+ dlg.show_all()
+ dlg.run()
+ dlg.destroy()
+
+ def deleteDialog(self):
+ store, iter = self.view.get_selection().get_selected()
+ if self.verify(_("Are you sure you want to delete %s '%s'?" % (self.description, store.get_value(iter, 0))), _("Delete %s" % self.description)) == gtk.RESPONSE_YES:
+ self.delete()
+
2007-03-19 14:48:15 +00:00
+ def use_menus(self):
+ return True
+
2007-02-20 14:57:59 +00:00
+ def addDialog(self):
+ self.dialogClear()
+ self.dialog.set_title(_("Add %s" % self.description))
+ self.dialog.set_position(gtk.WIN_POS_MOUSE)
+
+ while self.dialog.run() == gtk.RESPONSE_OK:
+ try:
2007-03-19 14:48:15 +00:00
+ if self.add() == False:
+ continue
2007-02-20 14:57:59 +00:00
+ break;
+ except ValueError, e:
+ self.error(e.args[0])
2007-03-19 14:48:15 +00:00
+ print
2007-02-20 14:57:59 +00:00
+ self.dialog.hide()
+
+ def propertiesDialog(self):
+ self.dialogInit()
+ self.dialog.set_title(_("Modify %s" % self.description))
+ self.dialog.set_position(gtk.WIN_POS_MOUSE)
+ while self.dialog.run() == gtk.RESPONSE_OK:
+ try:
2007-03-19 14:48:15 +00:00
+ if self.modify() == False:
+ continue
2007-02-20 14:57:59 +00:00
+ break;
+ except ValueError, e:
+ self.error(e.args[0])
+ self.dialog.hide()
+
+
2007-09-24 16:22:03 +00:00
+ def on_local_clicked(self, button):
+ self.local = not self.local
+ if self.local:
+ button.set_label(_("all"))
+ else:
+ button.set_label(_("Customized"))
+
+ self.load(self.filter)
+ return True
+
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/statusPage.py policycoreutils-2.0.46/gui/statusPage.py
2007-02-20 14:57:59 +00:00
--- nsapolicycoreutils/gui/statusPage.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/statusPage.py 2008-04-06 08:09:08.000000000 -0400
2007-12-03 01:35:17 +00:00
@@ -0,0 +1,227 @@
2007-02-20 14:57:59 +00:00
+## statusPage.py - show selinux status
+## Copyright (C) 2006 Red Hat, Inc.
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+## Author: Dan Walsh
+import string
+import gtk
+import gtk.glade
+import os
+import gobject
+import sys
+import tempfile
+
+INSTALLPATH = '/usr/share/system-config-selinux'
+sys.path.append(INSTALLPATH)
+
+rhplPath = "/usr/lib/python%d.%d/site-packages/rhpl" % (sys.version_info[0], sys.version_info[1])
+if not rhplPath in sys.path:
+ sys.path.append(rhplPath)
+
+rhplPath = "/usr/lib64/python%d.%d/site-packages/rhpl" % (sys.version_info[0], sys.version_info[1])
+if not rhplPath in sys.path:
+ sys.path.append(rhplPath)
+
+from Conf import *
+import commands
+ENFORCING = 0
+PERMISSIVE = 1
+DISABLED = 2
+modearray = ( "enforcing", "permissive", "disabled" )
+
+SELINUXDIR = "/etc/selinux/"
+RELABELFILE = "/.autorelabel"
+
+##
+## I18N
+##
+PROGNAME="policycoreutils"
+import gettext
+gettext.bindtextdomain(PROGNAME, "/usr/share/locale")
+gettext.textdomain(PROGNAME)
+import selinux
+try:
+ gettext.install(PROGNAME, localedir="/usr/share/locale", unicode=1)
+except IOError:
+ import __builtin__
+ __builtin__.__dict__['_'] = unicode
+
+class statusPage:
+ def __init__(self, xml):
+ self.xml = xml
+ self.needRelabel = False
+
+ self.type = selinux.selinux_getpolicytype()
+ # Bring in widgets from glade file.
+ self.typeHBox = xml.get_widget("typeHBox")
+ self.selinuxTypeOptionMenu = xml.get_widget("selinuxTypeOptionMenu")
+ self.typeLabel = xml.get_widget("typeLabel")
+ self.enabledOptionMenu = xml.get_widget("enabledOptionMenu")
+ self.currentOptionMenu = xml.get_widget("currentOptionMenu")
+ self.relabel_checkbutton = xml.get_widget("relabelCheckbutton")
+ self.relabel_checkbutton.set_active(self.is_relabel())
+ self.relabel_checkbutton.connect("toggled", self.on_relabel_toggle)
+ if self.get_current_mode() == ENFORCING or self.get_current_mode() == PERMISSIVE:
+ self.currentOptionMenu.append_text(_("Enforcing"))
+ self.currentOptionMenu.append_text(_("Permissive"))
+ self.currentOptionMenu.set_active(self.get_current_mode())
+ self.currentOptionMenu.connect("changed", self.set_current_mode)
+ self.currentOptionMenu.set_sensitive(True)
+ else:
+ self.currentOptionMenu.append_text(_("Disabled"))
2007-03-30 16:19:06 +00:00
+ self.currentOptionMenu.set_active(0)
2007-02-20 14:57:59 +00:00
+ self.currentOptionMenu.set_sensitive(False)
+
+
+ if self.read_selinux_config() == None:
+ self.selinuxsupport = False
+ else:
+ self.enabledOptionMenu.connect("changed", self.enabled_changed)
+ #
+ # This line must come after read_selinux_config
+ #
+ self.selinuxTypeOptionMenu.connect("changed", self.typemenu_changed)
+
+ self.typeLabel.set_mnemonic_widget(self.selinuxTypeOptionMenu)
+
2007-03-19 14:48:15 +00:00
+ def use_menus(self):
+ return False
+
2007-02-20 14:57:59 +00:00
+ def get_description(self):
+ return _("Status")
+
+ def get_current_mode(self):
+ if selinux.is_selinux_enabled():
+ if selinux.security_getenforce() > 0:
+ return ENFORCING
+ else:
+ return PERMISSIVE
+ else:
+ return DISABLED
+
+ def set_current_mode(self,menu):
+ selinux.security_setenforce(menu.get_active() == 0)
+
+ def is_relabel(self):
+ return os.access(RELABELFILE, os.F_OK) != 0
+
+ def on_relabel_toggle(self,button):
+ if button.get_active():
+ fd = open(RELABELFILE,"w")
+ fd.close()
+ else:
+ if os.access(RELABELFILE, os.F_OK) != 0:
+ os.unlink(RELABELFILE)
+
+ def verify(self, message):
+ dlg = gtk.MessageDialog(None, 0, gtk.MESSAGE_INFO,
+ gtk.BUTTONS_YES_NO,
+ message)
+ dlg.set_position(gtk.WIN_POS_MOUSE)
+ dlg.show_all()
+ rc = dlg.run()
+ dlg.destroy()
+ return rc
+
+ def typemenu_changed(self, menu):
+ type = self.get_type()
+ enabled = self.enabledOptionMenu.get_active()
+ if self.initialtype != type:
+ if self.verify(_("Changing the policy type will cause a relabel of the entire file system on the next boot. Relabeling takes a long time depending on the size of the file system. Do you wish to continue?")) == gtk.RESPONSE_NO:
+ menu.set_active(self.typeHistory)
+ return None
+
+ self.relabel_checkbutton.set_active(True)
+ self.conf["SELINUX"] = modearray[enabled]
+ self.conf["SELINUXTYPE"]=type
+ self.conf.write()
+ self.typeHistory = menu.get_active()
+
+ def enabled_changed(self, combo):
+ enabled = combo.get_active()
+ type = self.get_type()
+
2007-12-03 01:35:17 +00:00
+ if self.initEnabled != DISABLED and enabled == DISABLED:
+ if self.verify(_("Changing to SELinux disabled requires a reboot. It is not recommended. If you later decide to turn SELinux back on, the system will be required to relabel. If you just want to see if SELinux is causing a problem on your system, you can go to permissive mode which will only log errors and not enforce SELinux policy. Permissive mode does not require a reboot Do you wish to continue?")) == gtk.RESPONSE_NO:
+ combo.set_active(self.enabled)
+ return None
+
2007-02-20 14:57:59 +00:00
+ if self.initEnabled == DISABLED and enabled < 2:
+ if self.verify(_("Changing to SELinux enabled will cause a relabel of the entire file system on the next boot. Relabeling takes a long time depending on the size of the file system. Do you wish to continue?")) == gtk.RESPONSE_NO:
2007-12-03 01:35:17 +00:00
+ combo.set_active(self.enabled)
2007-02-20 14:57:59 +00:00
+ return None
+ self.relabel_checkbutton.set_active(True)
+
+ self.conf["SELINUX"] = modearray[enabled]
+ self.conf["SELINUXTYPE"]=type
+ self.conf.write()
2007-12-03 01:35:17 +00:00
+ self.enabled = enabled
2007-02-20 14:57:59 +00:00
+
+ def read_selinux_config(self):
+ self.initialtype = "targeted"
+ self.initEnabled = DISABLED
2007-12-03 01:35:17 +00:00
+ self.enabled = DISABLED
+
2007-02-20 14:57:59 +00:00
+ self.types = []
+ if os.access(SELINUXDIR, os.F_OK) == 0:
+ #File doesn't exist. return
+ return None
+
+ self.conf = ConfShellVar(SELINUXDIR+"config")
+ self.conf.rcs = 1
+ if self.conf.has_key("SELINUX"):
+ value = self.conf.vars["SELINUX"].upper().strip()
+ else:
+ value = "ENFORCING"
+ self.conf.vars["SELINUX"] = value
+
+ if value == "ENFORCING":
+ self.initEnabled = ENFORCING
+ self.enabledOptionMenu.set_active(ENFORCING)
2007-12-03 01:35:17 +00:00
+ self.enabled = ENFORCING
2007-02-20 14:57:59 +00:00
+ elif value == "PERMISSIVE":
+ self.initEnabled = PERMISSIVE
+ self.enabledOptionMenu.set_active(PERMISSIVE)
2007-12-03 01:35:17 +00:00
+ self.enabled = PERMISSIVE
2007-02-20 14:57:59 +00:00
+ elif value == "DISABLED":
+ self.initEnabled = DISABLED
+ self.enabledOptionMenu.set_active(DISABLED)
2007-12-03 01:35:17 +00:00
+ self.enabled = DISABLED
2007-02-20 14:57:59 +00:00
+
+ if self.conf.has_key("SELINUXTYPE"):
+ self.initialtype = self.conf.vars["SELINUXTYPE"].strip()
+ else:
+ self.conf.vars["SELINUXTYPE"] = self.initialtype
+
+ n = 0
+ current = n
+
+ for i in os.listdir(SELINUXDIR):
+ if os.path.isdir(SELINUXDIR+i) and os.path.isdir(SELINUXDIR+i+"/policy"):
+ self.types.append(i)
+ self.selinuxTypeOptionMenu.append_text(i)
+ if i == self.initialtype:
+ current = n
+ n = n+1
+ self.selinuxTypeOptionMenu.set_active(current)
+ self.typeHistory = current
+
+ return 0
+
+ def get_type(self):
+ return self.types[self.selinuxTypeOptionMenu.get_active()]
+
+
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinux.glade policycoreutils-2.0.46/gui/system-config-selinux.glade
2007-02-20 14:57:59 +00:00
--- nsapolicycoreutils/gui/system-config-selinux.glade 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/system-config-selinux.glade 2008-04-06 08:09:08.000000000 -0400
2008-03-20 12:43:37 +00:00
@@ -0,0 +1,3203 @@
2007-02-20 14:57:59 +00:00
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+<requires lib="gnome"/>
+<requires lib="bonobo"/>
+
+<widget class="GtkAboutDialog" id="aboutWindow">
2007-06-13 20:59:11 +00:00
+ <property name="border_width">5</property>
2007-02-20 14:57:59 +00:00
+ <property name="destroy_with_parent">False</property>
+ <property name="name" translatable="yes">system-config-selinux</property>
+ <property name="copyright" translatable="yes">Copyright (c)2006 Red Hat, Inc.
+Copyright (c) 2006 Dan Walsh <dwalsh@redhat.com></property>
+ <property name="wrap_license">False</property>
+ <property name="authors">Daniel Walsh <dwalsh@redhat.com>
+</property>
+ <property name="translator_credits" translatable="yes" comments="TRANSLATORS: Replace this string with your names, one name per line.">translator-credits</property>
+ <property name="logo">system-config-selinux.png</property>
+</widget>
+
+<widget class="GtkDialog" id="loginsDialog">
+ <property name="title" translatable="yes">Add SELinux Login Mapping</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <property name="has_separator">True</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="cancelbutton1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-6</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="okbutton1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkTable" id="table1">
+ <property name="visible">True</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">4</property>
+ <property name="column_spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label15">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Login Name</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</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label16">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">SELinux User</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</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label17">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">MLS/MCS Range</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</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="loginsNameEntry">
+ <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>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkComboBox" id="loginsSelinuxUserCombo">
+ <property name="visible">True</property>
+ <property name="add_tearoffs">False</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="loginsMLSEntry">
+ <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>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">5</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+<widget class="GtkDialog" id="portsDialog">
+ <property name="title" translatable="yes">Add SELinux Network Ports</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <property name="has_separator">True</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="vbox3">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="hbuttonbox1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="button1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-6</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="button2">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox4">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkTable" id="table2">
+ <property name="visible">True</property>
+ <property name="n_rows">4</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">4</property>
+ <property name="column_spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label18">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Port Number</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</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label19">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Protocol</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</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label20">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">SELinux Type</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</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="portsNumberEntry">
+ <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>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkComboBox" id="portsProtocolCombo">
+ <property name="visible">True</property>
+ <property name="items" translatable="yes">tcp
+udp</property>
+ <property name="add_tearoffs">False</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="portsNameEntry">
+ <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>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label21">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">MLS/MCS
+Level</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</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="portsMLSEntry">
+ <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>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">5</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+<widget class="GtkDialog" id="translationsDialog">
+ <property name="title" translatable="yes">Add SELinux Login Mapping</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <property name="has_separator">True</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="vbox5">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="hbuttonbox2">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="button3">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-6</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="button4">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox6">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkTable" id="table3">
+ <property name="visible">True</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">4</property>
+ <property name="column_spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label22">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">SELinux MLS/MCS
+Level</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</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label24">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Translation</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</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="translationsLevelEntry">
+ <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>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="translationsEntry">
+ <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>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">5</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+<widget class="GtkDialog" id="fcontextDialog">
+ <property name="title" translatable="yes">Add SELinux Login Mapping</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <property name="has_separator">True</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="vbox7">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="hbuttonbox3">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="button5">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-6</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="button6">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox8">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkTable" id="table4">
+ <property name="visible">True</property>
+ <property name="n_rows">4</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">4</property>
+ <property name="column_spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label25">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">File Specification</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</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label26">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">File Type</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</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label27">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">SELinux Type</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</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="fcontextEntry">
+ <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>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkComboBox" id="fcontextFileTypeCombo">
+ <property name="visible">True</property>
+ <property name="items" translatable="yes">all files
+regular file
+directory
+character device
+block device
+socket
+symbolic link
+named pipe
+</property>
+ <property name="add_tearoffs">False</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="fcontextTypeEntry">
+ <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>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label31">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">MLS</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</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="fcontextMLSEntry">
+ <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>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">5</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+<widget class="GtkDialog" id="usersDialog">
+ <property name="title" translatable="yes">Add SELinux User</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <property name="has_separator">True</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="vbox9">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="hbuttonbox4">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="button7">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-6</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="button8">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox10">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkTable" id="table5">
+ <property name="visible">True</property>
2008-03-20 12:43:37 +00:00
+ <property name="n_rows">3</property>
2007-02-20 14:57:59 +00:00
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">4</property>
+ <property name="column_spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label32">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">SELinux User</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</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label34">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">MLS/MCS Range</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</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="left_attach">0</property>
+ <property name="right_attach">1</property>
2008-03-20 12:43:37 +00:00
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
2007-02-20 14:57:59 +00:00
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="mlsRangeEntry">
+ <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>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
2008-03-20 12:43:37 +00:00
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
2007-02-20 14:57:59 +00:00
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
2008-03-20 12:43:37 +00:00
+ <widget class="GtkLabel" id="label36">
2007-02-20 14:57:59 +00:00
+ <property name="visible">True</property>
2008-03-20 12:43:37 +00:00
+ <property name="label" translatable="yes">SELinux Roles</property>
2007-02-20 14:57:59 +00:00
+ <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</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
2008-03-20 12:43:37 +00:00
+ <widget class="GtkEntry" id="selinuxRolesEntry">
2007-02-20 14:57:59 +00:00
+ <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>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="selinuxUserEntry">
+ <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>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">5</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+<widget class="GnomeApp" id="mainWindow">
+ <property name="width_request">800</property>
+ <property name="height_request">500</property>
2007-04-30 13:00:48 +00:00
+ <property name="title" translatable="yes">SELinux Administration</property>
2007-02-20 14:57:59 +00:00
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="icon">system-config-selinux.png</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <property name="enable_layout_config">True</property>
+
+ <child internal-child="dock">
+ <widget class="BonoboDock" id="bonobodock2">
+ <property name="visible">True</property>
+ <property name="allow_floating">True</property>
+
+ <child>
+ <widget class="BonoboDockItem" id="bonobodockitem3">
+ <property name="visible">True</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+ <child>
+ <widget class="GtkMenuBar" id="menubar1">
+ <property name="visible">True</property>
+ <property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>
+ <property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
+
+ <child>
+ <widget class="GtkMenuItem" id="file1">
+ <property name="visible">True</property>
+ <property name="stock_item">GNOMEUIINFO_MENU_FILE_TREE</property>
+
+ <child>
+ <widget class="GtkMenu" id="file1_menu">
+
+ <child>
2007-03-19 14:48:15 +00:00
+ <widget class="GtkImageMenuItem" id="add_menu_item">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Add</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="on_add_clicked" last_modification_time="Sat, 17 Mar 2007 12:21:12 GMT"/>
+ <accelerator key="a" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image13">
+ <property name="visible">True</property>
+ <property name="stock">gtk-add</property>
+ <property name="icon_size">1</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="properties_menu_item">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Properties</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="on_properties_clicked" last_modification_time="Sat, 17 Mar 2007 12:21:12 GMT"/>
+ <accelerator key="p" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image14">
+ <property name="visible">True</property>
+ <property name="stock">gtk-properties</property>
+ <property name="icon_size">1</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="delete_menu_item">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Delete</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="on_delete_clicked" last_modification_time="Sat, 17 Mar 2007 12:21:12 GMT"/>
+ <accelerator key="Delete" modifiers="0" signal="activate"/>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image15">
+ <property name="visible">True</property>
+ <property name="stock">gtk-delete</property>
+ <property name="icon_size">1</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
2007-02-20 14:57:59 +00:00
+ <widget class="GtkImageMenuItem" id="quit">
+ <property name="visible">True</property>
+ <property name="stock_item">GNOMEUIINFO_MENU_EXIT_ITEM</property>
+ <signal name="activate" handler="on_quit_activate" last_modification_time="Fri, 06 Oct 2006 13:58:19 GMT"/>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="help1">
+ <property name="visible">True</property>
+ <property name="stock_item">GNOMEUIINFO_MENU_HELP_TREE</property>
+
+ <child>
+ <widget class="GtkMenu" id="help1_menu">
+
+ <child>
+ <widget class="GtkImageMenuItem" id="about">
+ <property name="visible">True</property>
+ <property name="stock_item">GNOMEUIINFO_MENU_ABOUT_ITEM</property>
+ <signal name="activate" handler="on_about_activate" last_modification_time="Fri, 06 Oct 2006 13:58:02 GMT"/>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="placement">BONOBO_DOCK_TOP</property>
+ <property name="band">0</property>
+ <property name="position">0</property>
+ <property name="offset">0</property>
+ <property name="behavior">BONOBO_DOCK_ITEM_BEH_EXCLUSIVE|BONOBO_DOCK_ITEM_BEH_NEVER_VERTICAL|BONOBO_DOCK_ITEM_BEH_LOCKED</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHPaned" id="hpaned1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="position">0</property>
+
+ <child>
+ <widget class="GtkFrame" id="frame1">
+ <property name="border_width">5</property>
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkTreeView" id="selectView">
+ <property name="visible">True</property>
2007-06-25 10:10:55 +00:00
+ <property name="tooltip" translatable="yes">Select Management Object</property>
2007-02-20 14:57:59 +00:00
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</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>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label45">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Select:</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</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="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="shrink">False</property>
+ <property name="resize">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkNotebook" id="notebook">
+ <property name="visible">True</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">True</property>
+ <property name="tab_pos">GTK_POS_TOP</property>
+ <property name="scrollable">False</property>
+ <property name="enable_popup">False</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkTable" id="table6">
+ <property name="visible">True</property>
+ <property name="n_rows">4</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">5</property>
+ <property name="column_spacing">5</property>
+
+ <child>
+ <widget class="GtkLabel" id="label29">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">System Default Enforcing Mode</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkComboBox" id="enabledOptionMenu">
+ <property name="visible">True</property>
+ <property name="items" translatable="yes">Enforcing
+Permissive
+Disabled
+</property>
+ <property name="add_tearoffs">False</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label48">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Current Enforcing Mode</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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkComboBox" id="currentOptionMenu">
+ <property name="visible">True</property>
+ <property name="items" translatable="yes"></property>
+ <property name="add_tearoffs">False</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="typeLabel">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">System Default Policy Type: </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="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkComboBox" id="selinuxTypeOptionMenu">
+ <property name="visible">True</property>
+ <property name="items" translatable="yes"></property>
+ <property name="add_tearoffs">False</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="relabelCheckbutton">
+ <property name="visible">True</property>
2007-06-25 10:10:55 +00:00
+ <property name="tooltip" translatable="yes">Select if you wish to relabel then entire file system on next reboot. Relabeling can take a very long time, depending on the size of the system. If you are changing policy types or going from disabled to enforcing, a relabel is required.</property>
2007-02-20 14:57:59 +00:00
+ <property name="can_focus">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment4">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">0</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox6">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">2</property>
+
+ <child>
+ <widget class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="stock">gtk-refresh</property>
+ <property name="icon_size">4</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label49">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Relabel on next reboot.</property>
+ <property name="use_underline">True</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">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label37">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">label37</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="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
2007-04-09 14:15:34 +00:00
+ <widget class="GtkVBox" id="vbox18">
2007-02-20 14:57:59 +00:00
+ <property name="visible">True</property>
2007-04-09 14:15:34 +00:00
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
2007-09-24 16:22:03 +00:00
+ <widget class="GtkToolbar" id="toolbar9">
+ <property name="visible">True</property>
+ <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
+ <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
+ <property name="tooltips">True</property>
+ <property name="show_arrow">True</property>
+
+ <child>
2007-10-01 21:45:35 +00:00
+ <widget class="GtkToolButton" id="booleanRevertButton">
2007-09-24 16:22:03 +00:00
+ <property name="visible">True</property>
2007-10-01 21:45:35 +00:00
+ <property name="tooltip" translatable="yes">Revert boolean setting to system default</property>
2007-09-24 16:22:03 +00:00
+ <property name="stock_id">gtk-revert-to-saved</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="on_delete_clicked" last_modification_time="Mon, 16 Jan 2006 18:26:29 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkToolButton" id="toolbutton34">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Toggle between Customized and All Booleans</property>
+ <property name="label" translatable="yes">Customized</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-find</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="on_local_clicked" last_modification_time="Wed, 19 Sep 2007 19:14:08 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
2007-04-09 14:15:34 +00:00
+ <widget class="GtkHBox" id="hbox7">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label51">
+ <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="booleansFilter">
+ <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">10</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
2007-02-20 14:57:59 +00:00
+
+ <child>
2007-04-09 14:15:34 +00:00
+ <widget class="GtkScrolledWindow" id="scrolledwindow18">
2007-02-20 14:57:59 +00:00
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
2007-04-09 14:15:34 +00:00
+ <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>
+
+ <child>
+ <widget class="GtkTreeView" id="booleansView">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
2007-11-05 21:30:56 +00:00
+ <property name="headers_visible">True</property>
2007-04-09 14:15:34 +00:00
+ <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>
+ </child>
2007-02-20 14:57:59 +00:00
+ </widget>
2007-04-09 14:15:34 +00:00
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
2007-02-20 14:57:59 +00:00
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label50">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">label50</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="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox11">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkToolbar" id="toolbar2">
+ <property name="visible">True</property>
+ <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
+ <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
+ <property name="tooltips">True</property>
+ <property name="show_arrow">True</property>
+
+ <child>
+ <widget class="GtkToolButton" id="toolbutton5">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Add File Context</property>
+ <property name="stock_id">gtk-add</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="on_add_clicked" last_modification_time="Mon, 16 Jan 2006 18:27:03 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkToolButton" id="toolbutton6">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Modify File Context</property>
+ <property name="stock_id">gtk-properties</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="on_properties_clicked" last_modification_time="Mon, 16 Jan 2006 18:26:51 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkToolButton" id="toolbutton7">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Delete File Context</property>
+ <property name="stock_id">gtk-delete</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="on_delete_clicked" last_modification_time="Mon, 16 Jan 2006 18:26:29 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
2007-09-24 16:22:03 +00:00
+
+ <child>
+ <widget class="GtkToolButton" id="customizedButton">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Toggle between all and customized file context</property>
+ <property name="label" translatable="yes">Customized</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-find</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="on_local_clicked" last_modification_time="Wed, 19 Sep 2007 19:14:08 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
2007-02-20 14:57:59 +00:00
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
2007-11-05 21:30:56 +00:00
+ <widget class="GtkHBox" id="hbox14">
2007-02-20 14:57:59 +00:00
+ <property name="visible">True</property>
2007-11-05 21:30:56 +00:00
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
2007-02-20 14:57:59 +00:00
+
+ <child>
2007-11-05 21:30:56 +00:00
+ <widget class="GtkLabel" id="label58">
2007-02-20 14:57:59 +00:00
+ <property name="visible">True</property>
2007-11-05 21:30:56 +00:00
+ <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>
2007-04-15 01:42:09 +00:00
+
2007-11-05 21:30:56 +00:00
+ <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"/>
2007-02-20 14:57:59 +00:00
+ </widget>
2007-11-05 21:30:56 +00:00
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
2007-02-20 14:57:59 +00:00
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
2007-11-05 21:30:56 +00:00
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
2007-12-16 13:14:09 +00:00
+ <widget class="GtkScrolledWindow" id="scrolledwindow19">
2007-11-05 21:30:56 +00:00
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
2007-12-16 13:14:09 +00:00
+ <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>
+
+ <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>
+ </child>
2007-11-05 21:30:56 +00:00
+ </widget>
+ <packing>
+ <property name="padding">0</property>
2007-02-20 14:57:59 +00:00
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label38">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">label38</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="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox12">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkToolbar" id="toolbar3">
+ <property name="visible">True</property>
+ <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
+ <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
+ <property name="tooltips">True</property>
+ <property name="show_arrow">True</property>
+
+ <child>
+ <widget class="GtkToolButton" id="toolbutton8">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Add SELinux User Mapping</property>
+ <property name="stock_id">gtk-add</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="on_add_clicked" last_modification_time="Mon, 16 Jan 2006 18:27:03 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkToolButton" id="toolbutton29">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Modify SELinux User Mapping</property>
+ <property name="stock_id">gtk-properties</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="on_properties_clicked" last_modification_time="Wed, 15 Nov 2006 16:38:33 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkToolButton" id="toolbutton10">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Delete SELinux User Mapping</property>
+ <property name="stock_id">gtk-delete</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="on_delete_clicked" last_modification_time="Mon, 16 Jan 2006 18:26:29 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
2007-06-13 20:59:11 +00:00
+ <widget class="GtkHBox" id="hbox13">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label57">
+ <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="loginsFilterEntry">
+ <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>
2007-02-20 14:57:59 +00:00
+ <widget class="GtkScrolledWindow" id="scrolledwindow16">
+ <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>
+
+ <child>
+ <widget class="GtkTreeView" id="loginsView">
+ <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>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label39">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">label39</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="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox14">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkToolbar" id="toolbar5">
+ <property name="visible">True</property>
+ <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
+ <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
+ <property name="tooltips">True</property>
+ <property name="show_arrow">True</property>
+
+ <child>
+ <widget class="GtkToolButton" id="toolbutton14">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Add Translation</property>
+ <property name="stock_id">gtk-add</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="on_add_clicked" last_modification_time="Mon, 16 Jan 2006 18:27:03 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkToolButton" id="toolbutton15">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Modify Translation</property>
+ <property name="stock_id">gtk-properties</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="on_properties_clicked" last_modification_time="Mon, 16 Jan 2006 18:26:51 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkToolButton" id="toolbutton16">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Delete Translation</property>
+ <property name="stock_id">gtk-delete</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="on_delete_clicked" last_modification_time="Mon, 16 Jan 2006 18:26:29 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
2007-06-13 20:59:11 +00:00
+ <widget class="GtkHBox" id="hbox12">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label56">
+ <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="usersFilterEntry">
+ <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>
2007-02-20 14:57:59 +00:00
+ <widget class="GtkScrolledWindow" id="scrolledwindow11">
+ <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>
+
+ <child>
+ <widget class="GtkTreeView" id="usersView">
+ <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>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label41">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">label41</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="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox13">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkToolbar" id="toolbar4">
+ <property name="visible">True</property>
+ <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
+ <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
+ <property name="tooltips">True</property>
+ <property name="show_arrow">True</property>
+
+ <child>
+ <widget class="GtkToolButton" id="toolbutton11">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Add SELinux User</property>
+ <property name="stock_id">gtk-add</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="on_add_clicked" last_modification_time="Mon, 16 Jan 2006 18:27:03 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkToolButton" id="toolbutton12">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Modify SELinux User</property>
+ <property name="stock_id">gtk-properties</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="on_properties_clicked" last_modification_time="Mon, 16 Jan 2006 18:26:51 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkToolButton" id="toolbutton13">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Add SELinux User</property>
+ <property name="stock_id">gtk-delete</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="on_delete_clicked" last_modification_time="Mon, 16 Jan 2006 18:26:29 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
2007-06-11 16:47:29 +00:00
+ <widget class="GtkHBox" id="hbox10">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label54">
+ <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="translationsFilterEntry">
+ <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>
2007-02-20 14:57:59 +00:00
+ <widget class="GtkScrolledWindow" id="scrolledwindow12">
+ <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>
+
+ <child>
+ <widget class="GtkTreeView" id="translationsView">
+ <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>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label40">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">label40</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="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox15">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkToolbar" id="toolbar6">
+ <property name="visible">True</property>
+ <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
+ <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
+ <property name="tooltips">False</property>
+ <property name="show_arrow">True</property>
+
+ <child>
+ <widget class="GtkToolButton" id="portsAddButton">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Add Network Port</property>
+ <property name="stock_id">gtk-add</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="on_add_clicked" last_modification_time="Mon, 16 Jan 2006 18:27:03 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkToolButton" id="portsPropertiesButton">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Edit Network Port</property>
+ <property name="stock_id">gtk-properties</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="on_properties_clicked" last_modification_time="Mon, 16 Jan 2006 18:26:51 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkToolButton" id="portsDeleteButton">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Delete Network Port</property>
+ <property name="stock_id">gtk-delete</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="on_delete_clicked" last_modification_time="Mon, 16 Jan 2006 18:26:29 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkToolItem" id="toolitem2">
+ <property name="visible">True</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+
+ <child>
+ <widget class="GtkVSeparator" id="vseparator1">
+ <property name="width_request">32</property>
+ <property name="visible">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">False</property>
+ </packing>
+ </child>
+
+ <child>
2007-10-01 21:45:35 +00:00
+ <widget class="GtkToolButton" id="listViewButton">
2007-02-20 14:57:59 +00:00
+ <property name="visible">True</property>
2007-10-01 21:45:35 +00:00
+ <property name="tooltip" translatable="yes">Toggle between Customized and All Ports</property>
+ <property name="label" translatable="yes">Group View</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-indent</property>
2007-02-20 14:57:59 +00:00
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
2007-10-01 21:45:35 +00:00
+ <signal name="clicked" handler="on_group_clicked" last_modification_time="Mon, 01 Oct 2007 21:31:19 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
2007-02-20 14:57:59 +00:00
+
2007-10-01 21:45:35 +00:00
+ <child>
+ <widget class="GtkToolButton" id="toolbutton35">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Toggle between Customized and All Ports</property>
+ <property name="label" translatable="yes">Customized</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-find</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="on_local_clicked" last_modification_time="Wed, 19 Sep 2007 19:14:08 GMT"/>
2007-02-20 14:57:59 +00:00
+ </widget>
+ <packing>
+ <property name="expand">False</property>
2007-10-01 21:45:35 +00:00
+ <property name="homogeneous">True</property>
2007-02-20 14:57:59 +00:00
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
2007-06-11 16:47:29 +00:00
+ <widget class="GtkHBox" id="hbox9">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label53">
+ <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="portsFilterEntry">
+ <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>
2007-02-20 14:57:59 +00:00
+ <widget class="GtkScrolledWindow" id="scrolledwindow13">
+ <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>
+
+ <child>
+ <widget class="GtkTreeView" id="portsView">
+ <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>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label42">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">label42</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="type">tab</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox17">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkToolbar" id="toolbar8">
+ <property name="visible">True</property>
+ <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
+ <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
+ <property name="tooltips">True</property>
+ <property name="show_arrow">True</property>
+
+ <child>
2007-03-19 14:48:15 +00:00
+ <widget class="GtkToolButton" id="newModuleButton">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Generate new policy module</property>
+ <property name="stock_id">gtk-new</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="on_new_clicked" last_modification_time="Sat, 17 Mar 2007 15:53:29 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+
+ <child>
2007-02-20 14:57:59 +00:00
+ <widget class="GtkToolButton" id="toolbutton23">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Load policy module</property>
+ <property name="stock_id">gtk-add</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="on_add_clicked" last_modification_time="Mon, 16 Jan 2006 18:27:03 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkToolButton" id="toolbutton25">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Remove loadable policy module</property>
+ <property name="stock_id">gtk-remove</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="on_delete_clicked" last_modification_time="Mon, 16 Jan 2006 18:26:29 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkToolItem" id="toolitem3">
+ <property name="visible">True</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+
+ <child>
+ <widget class="GtkVSeparator" id="vseparator2">
+ <property name="width_request">10</property>
+ <property name="visible">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkToolButton" id="enableAuditButton">
+ <property name="visible">True</property>
2007-10-17 03:39:17 +00:00
+ <property name="tooltip" translatable="yes">Enable/Disable additional audit rules, that are normally not reported in the log files.</property>
2007-02-20 14:57:59 +00:00
+ <property name="label" translatable="yes">Enable Audit</property>
+ <property name="use_underline">True</property>
+ <property name="stock_id">gtk-zoom-in</property>
+ <property name="visible_horizontal">True</property>
+ <property name="visible_vertical">True</property>
+ <property name="is_important">False</property>
+ <signal name="clicked" handler="on_disable_audit_clicked" last_modification_time="Wed, 15 Nov 2006 16:29:34 GMT"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
2007-06-11 16:47:29 +00:00
+ <widget class="GtkHBox" id="hbox11">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label55">
+ <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>
2007-06-13 20:59:11 +00:00
+ <widget class="GtkEntry" id="modulesFilterEntry">
2007-06-11 16:47:29 +00:00
+ <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>
2007-02-20 14:57:59 +00:00
+ <widget class="GtkScrolledWindow" id="scrolledwindow15">
+ <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>
+
+ <child>
+ <widget class="GtkTreeView" id="modulesView">
+ <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>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label44">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">label44</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="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="shrink">True</property>
+ <property name="resize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child internal-child="appbar">
+ <widget class="GnomeAppBar" id="appbar2">
+ <property name="visible">True</property>
+ <property name="has_progress">True</property>
+ <property name="has_status">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+</widget>
+
+</glade-interface>
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinux.py policycoreutils-2.0.46/gui/system-config-selinux.py
2007-02-20 14:57:59 +00:00
--- nsapolicycoreutils/gui/system-config-selinux.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/system-config-selinux.py 2008-04-06 08:09:08.000000000 -0400
2007-09-24 16:22:03 +00:00
@@ -0,0 +1,175 @@
2007-02-20 14:57:59 +00:00
+#!/usr/bin/python
+#
+# system-config-selinux.py - GUI for SELinux Config tool in system-config-selinux
+#
+# Dan Walsh <dwalsh@redhat.com>
+#
+# Copyright 2006 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+import signal
+import string
+import gtk
+import gtk.glade
+import os
+import gobject
+import gnome
+import sys
+import statusPage
+import booleansPage
+import loginsPage
+import usersPage
+import portsPage
+import modulesPage
+import fcontextPage
+import translationsPage
2007-03-30 16:19:06 +00:00
+import selinux
2007-02-20 14:57:59 +00:00
+##
+## I18N
+##
+PROGNAME="system-config-selinux"
+
+import gettext
+gettext.bindtextdomain(PROGNAME, "/usr/share/locale")
+gettext.textdomain(PROGNAME)
+try:
2007-06-11 16:47:29 +00:00
+ gettext.install(PROGNAME,
+ localedir="/usr/share/locale",
+ unicode=False,
+ codeset = 'utf-8')
2007-02-20 14:57:59 +00:00
+except IOError:
+ import __builtin__
+ __builtin__.__dict__['_'] = unicode
+
+gnome.program_init("SELinux Management Tool", "5")
+
+version = "1.0"
+
+sys.path.append('/usr/share/system-config-selinux')
+
+
+
+##
+## Pull in the Glade file
+##
+if os.access("system-config-selinux.glade", os.F_OK):
+ xml = gtk.glade.XML ("system-config-selinux.glade", domain=PROGNAME)
+else:
+ xml = gtk.glade.XML ("/usr/share/system-config-selinux/system-config-selinux.glade", domain=PROGNAME)
+
+class childWindow:
+ def __init__(self):
+ self.tabs=[]
+ self.xml = xml
+ xml.signal_connect("on_quit_activate", self.destroy)
+ xml.signal_connect("on_delete_clicked", self.delete)
+ xml.signal_connect("on_add_clicked", self.add)
+ xml.signal_connect("on_properties_clicked", self.properties)
2007-09-24 16:22:03 +00:00
+ xml.signal_connect("on_local_clicked", self.on_local_clicked)
2007-02-20 14:57:59 +00:00
+ self.add_page(statusPage.statusPage(xml))
2007-03-30 16:19:06 +00:00
+ if selinux.is_selinux_enabled() > 0:
+ self.add_page(booleansPage.booleansPage(xml))
+ self.add_page(fcontextPage.fcontextPage(xml))
+ self.add_page(loginsPage.loginsPage(xml))
+ self.add_page(usersPage.usersPage(xml))
+ self.add_page(translationsPage.translationsPage(xml))
+ self.add_page(portsPage.portsPage(xml))
+ self.add_page(modulesPage.modulesPage(xml)) # modules
2007-02-20 14:57:59 +00:00
+
+ xml.signal_connect("on_quit_activate", self.destroy)
+ xml.signal_connect("on_policy_activate", self.policy)
+ xml.signal_connect("on_logging_activate", self.logging)
+ xml.signal_connect("on_about_activate", self.on_about_activate)
+
2007-03-19 14:48:15 +00:00
+ self.add_menu = xml.get_widget("add_menu_item")
+ self.properties_menu = xml.get_widget("properties_menu_item")
+ self.delete_menu = xml.get_widget("delete_menu_item")
+
2007-02-20 14:57:59 +00:00
+ def add_page(self, page):
+ self.tabs.append(page)
+
+ def policy(self, args):
+ os.spawnl(os.P_NOWAIT, "/usr/share/system-config-selinux/semanagegui.py")
+ def logging(self, args):
+ os.spawnl(os.P_NOWAIT, "/usr/bin/seaudit")
+
+ def delete(self, args):
+ self.tabs[self.notebook.get_current_page()].deleteDialog()
+
+ def add(self, args):
+ self.tabs[self.notebook.get_current_page()].addDialog()
+
+ def properties(self, args):
+ self.tabs[self.notebook.get_current_page()].propertiesDialog()
+
2007-09-24 16:22:03 +00:00
+ def on_local_clicked(self, button):
+ self.tabs[self.notebook.get_current_page()].on_local_clicked(button)
+
2007-02-20 14:57:59 +00:00
+ def on_about_activate(self, args):
+ dlg = xml.get_widget ("aboutWindow")
+ dlg.run ()
+ dlg.hide ()
+
+ def destroy(self, args):
+ gtk.main_quit()
+
2007-03-19 14:48:15 +00:00
+ def use_menus(self, use_menus):
+ self.add_menu.set_sensitive(use_menus)
+ self.properties_menu.set_sensitive(use_menus)
+ self.delete_menu.set_sensitive(use_menus)
+
2007-02-20 14:57:59 +00:00
+ def itemSelected(self, selection):
+ store, rows = selection.get_selected_rows()
+ if store != None and len(rows) > 0:
+ self.notebook.set_current_page(rows[0][0])
2007-03-19 14:48:15 +00:00
+ self.use_menus(self.tabs[rows[0][0]].use_menus())
2007-02-20 14:57:59 +00:00
+ else:
+ self.notebook.set_current_page(0)
2007-03-19 14:48:15 +00:00
+ self.use_menus(self.tabs[0].use_menus())
2007-02-20 14:57:59 +00:00
+
+
+ def setupScreen(self):
+ # Bring in widgets from glade file.
+ self.mainWindow = self.xml.get_widget("mainWindow")
+ self.notebook = self.xml.get_widget("notebook")
+ self.view = self.xml.get_widget("selectView")
+ self.view.get_selection().connect("changed", self.itemSelected)
+ self.store = gtk.ListStore(gobject.TYPE_STRING)
+ self.view.set_model(self.store)
+ col = gtk.TreeViewColumn("", gtk.CellRendererText(), text = 0)
+ col.set_resizable(True)
+ self.view.append_column(col)
+
+ for page in self.tabs:
+ iter = self.store.append()
+ self.store.set_value(iter, 0, page.get_description())
+ self.view.get_selection().select_path ((0,))
+
+ def stand_alone(self):
+ desktopName = _("Configue SELinux")
+
+ self.setupScreen()
+
+ self.mainWindow.connect("destroy", self.destroy)
+
+ self.mainWindow.show_all()
+ gtk.main()
+
+if __name__ == "__main__":
+ signal.signal (signal.SIGINT, signal.SIG_DFL)
+
+ app = childWindow()
+ app.stand_alone()
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/boolean.py policycoreutils-2.0.46/gui/templates/boolean.py
2007-10-17 01:33:45 +00:00
--- nsapolicycoreutils/gui/templates/boolean.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/templates/boolean.py 2008-04-06 08:09:08.000000000 -0400
2007-10-17 01:33:45 +00:00
@@ -0,0 +1,40 @@
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
+#
+# policygentool is a tool for the initial generation of SELinux policy
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA
+#
+#
+########################### boolean Template File ###########################
+
+te_boolean="""
+## <desc>
+## <p>
+## DESCRIPTION
+## </p>
+## </desc>
+gen_tunable(BOOLEAN,false)
+"""
+
+te_rules="""
+tunable_policy(`BOOLEAN',`
+#TRUE
+',`
+#FALSE
+')
+"""
+
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/etc_rw.py policycoreutils-2.0.46/gui/templates/etc_rw.py
2007-10-16 23:47:15 +00:00
--- nsapolicycoreutils/gui/templates/etc_rw.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/templates/etc_rw.py 2008-04-06 08:09:08.000000000 -0400
2007-10-16 23:47:15 +00:00
@@ -0,0 +1,129 @@
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
+#
+# policygentool is a tool for the initial generation of SELinux policy
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA
+#
+#
+########################### etc_rw Template File #############################
+
+########################### Type Enforcement File #############################
+te_types="""
+type TEMPLATETYPE_etc_rw_t;
+files_type(TEMPLATETYPE_etc_rw_t)
+"""
+te_rules="""
+allow TEMPLATETYPE_t TEMPLATETYPE_etc_rw_t:file manage_file_perms;
+allow TEMPLATETYPE_t TEMPLATETYPE_etc_rw_t:dir manage_dir_perms;
+files_etc_filetrans(TEMPLATETYPE_t,TEMPLATETYPE_etc_rw_t, { file dir })
+"""
+
+########################### Interface File #############################
+if_rules="""
+########################################
+## <summary>
+## Search TEMPLATETYPE conf directories.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_search_conf',`
+ gen_require(`
+ type TEMPLATETYPE_etc_rw_t;
+ ')
+
+ allow $1 TEMPLATETYPE_etc_rw_t:dir search_dir_perms;
+ files_search_etc($1)
+')
+
+########################################
+## <summary>
+## Read TEMPLATETYPE conf files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_read_conf_files',`
+ gen_require(`
+ type TEMPLATETYPE_etc_rw_t;
+ ')
+
+ allow $1 TEMPLATETYPE_etc_rw_t:file r_file_perms;
+ allow $1 TEMPLATETYPE_etc_rw_t:dir list_dir_perms;
+ files_search_etc($1)
+')
+
+########################################
+## <summary>
+## Create, read, write, and delete
+## TEMPLATETYPE conf files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_manage_conf_files',`
+ gen_require(`
+ type TEMPLATETYPE_etc_rw_t;
+ ')
+
2007-10-18 21:48:15 +00:00
+ manage_files_pattern($1,TEMPLATETYPE_etc_rw_t,TEMPLATETYPE_etc_rw_t)
2007-10-16 23:47:15 +00:00
+ 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;
+ ')
+
2007-10-18 21:48:15 +00:00
+ 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)
2007-10-16 23:47:15 +00:00
+')
+
+"""
+
+if_admin_rules="""
2007-11-19 18:18:08 +00:00
+ TEMPLATETYPE_manage_conf($1)
2007-10-16 23:47:15 +00:00
+"""
+
+########################### File Context ##################################
+fc_file="""\
+FILENAME -- gen_context(system_u:object_r:TEMPLATETYPE_etc_rw_t,s0)
+"""
+
+fc_dir="""\
+FILENAME(/.*)? gen_context(system_u:object_r:TEMPLATETYPE_etc_rw_t,s0)
+"""
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/executable.py policycoreutils-2.0.46/gui/templates/executable.py
2007-03-19 14:48:15 +00:00
--- nsapolicycoreutils/gui/templates/executable.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/templates/executable.py 2008-04-06 08:09:08.000000000 -0400
2008-02-06 15:19:11 +00:00
@@ -0,0 +1,328 @@
2007-03-19 14:48:15 +00:00
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
+#
+# policygentool is a tool for the initial generation of SELinux policy
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA
+#
+#
+########################### Type Enforcement File #############################
+te_daemon_types="""\
+policy_module(TEMPLATETYPE,1.0.0)
+
+########################################
+#
+# Declarations
+#
+
+type TEMPLATETYPE_t;
+type TEMPLATETYPE_exec_t;
+domain_type(TEMPLATETYPE_t)
+init_daemon_domain(TEMPLATETYPE_t, TEMPLATETYPE_exec_t)
+"""
+
2007-08-31 19:10:10 +00:00
+te_initscript_types="""
+type TEMPLATETYPE_script_exec_t;
+init_script_type(TEMPLATETYPE_script_exec_t)
+"""
+
2007-03-19 14:48:15 +00:00
+te_inetd_types="""\
+policy_module(TEMPLATETYPE,1.0.0)
+
+########################################
+#
+# Declarations
+#
+
+type TEMPLATETYPE_t;
+type TEMPLATETYPE_exec_t;
+inetd_service_domain(TEMPLATETYPE_t, TEMPLATETYPE_exec_t)
+"""
+
+te_userapp_types="""\
+policy_module(TEMPLATETYPE,1.0.0)
+
+########################################
+#
+# Declarations
+#
+
2007-08-31 19:10:10 +00:00
+type TEMPLATETYPE_t;
2007-03-19 14:48:15 +00:00
+type TEMPLATETYPE_exec_t;
2007-08-31 19:10:10 +00:00
+application_domain(TEMPLATETYPE_t, TEMPLATETYPE_exec_t)
2007-09-10 19:45:03 +00:00
+role system_r types TEMPLATETYPE_t;
+
2007-03-19 14:48:15 +00:00
+"""
+
+te_cgi_types="""\
+policy_module(TEMPLATETYPE,1.0.0)
+
+########################################
+#
+# Declarations
+#
+
+apache_content_template(TEMPLATETYPE)
+"""
+
+te_daemon_rules="""
+########################################
+#
+# TEMPLATETYPE local policy
+#
+
+# Init script handling
+domain_use_interactive_fds(TEMPLATETYPE_t)
+
2008-02-08 19:59:45 +00:00
+# internal communication is often done using fifo and unix sockets.
2007-03-19 14:48:15 +00:00
+allow TEMPLATETYPE_t self:fifo_file rw_file_perms;
+allow TEMPLATETYPE_t self:unix_stream_socket create_stream_socket_perms;
+
+files_read_etc_files(TEMPLATETYPE_t)
+
+libs_use_ld_so(TEMPLATETYPE_t)
+libs_use_shared_libs(TEMPLATETYPE_t)
+
+miscfiles_read_localization(TEMPLATETYPE_t)
+
+"""
+
+te_inetd_rules="""
+"""
+
+te_userapp_rules="""
2007-09-10 19:45:03 +00:00
+########################################
+#
+# TEMPLATETYPE local policy
+#
+
+## internal communication is often done using fifo and unix sockets.
+allow TEMPLATETYPE_t self:fifo_file rw_file_perms;
+allow TEMPLATETYPE_t self:unix_stream_socket create_stream_socket_perms;
+
+files_read_etc_files(TEMPLATETYPE_t)
+
+libs_use_ld_so(TEMPLATETYPE_t)
+libs_use_shared_libs(TEMPLATETYPE_t)
+
+miscfiles_read_localization(TEMPLATETYPE_t)
+
2007-03-19 14:48:15 +00:00
+"""
+
+te_cgi_rules="""
+"""
+
+te_uid_rules="""
+auth_use_nsswitch(TEMPLATETYPE_t)
+"""
+
2007-03-29 16:16:45 +00:00
+te_syslog_rules="""
+logging_send_syslog_msg(TEMPLATETYPE_t)
2007-03-19 14:48:15 +00:00
+"""
+
2007-03-29 16:16:45 +00:00
+te_pam_rules="""
+auth_domtrans_chk_passwd(TEMPLATETYPE_t)
2007-03-19 14:48:15 +00:00
+"""
+
2007-10-02 20:21:53 +00:00
+te_mail_rules="""
+mta_send_mail(TEMPLATETYPE_t)
+"""
+
+te_dbus_rules="""
+optional_policy(`
+ dbus_system_bus_client_template(TEMPLATETYPE,TEMPLATETYPE_t)
+ dbus_connect_system_bus(TEMPLATETYPE_t)
+')
+"""
+
+te_audit_rules="""
+logging_send_audit_msgs(TEMPLATETYPE_t)
+"""
+
2007-10-01 21:45:35 +00:00
+te_userapp_trans_rules="""
+optional_policy(`
+ gen_require(`
+ type USER_t;
+ type USER_devpts_t;
+ type USER_tty_device_t;
+ role USER_r;
+ ')
+
+ TEMPLATETYPE_run(USER_t, USER_r, { USER_tty_device_t USER_devpts_t })
+')
+"""
+
2007-03-19 14:48:15 +00:00
+########################### Interface File #############################
2007-08-31 19:10:10 +00:00
+if_program_rules="""
2007-03-19 14:48:15 +00:00
+## <summary>policy for TEMPLATETYPE</summary>
+
+########################################
+## <summary>
+## Execute a domain transition to run TEMPLATETYPE.
+## </summary>
+## <param name=\"domain\">
+## <summary>
+## Domain allowed to transition.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_domtrans',`
+ gen_require(`
2007-09-06 12:25:31 +00:00
+ type TEMPLATETYPE_t;
+ type TEMPLATETYPE_exec_t;
2007-03-19 14:48:15 +00:00
+ ')
+
2007-09-10 19:45:03 +00:00
+ domtrans_pattern($1,TEMPLATETYPE_exec_t,TEMPLATETYPE_t)
+')
+
+"""
+
+if_user_program_rules="""
+########################################
+## <summary>
+## Execute TEMPLATETYPE in the TEMPLATETYPE domain, and
+## allow the specified role the TEMPLATETYPE domain.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access
+## </summary>
+## </param>
+## <param name="role">
+## <summary>
+## The role to be allowed the TEMPLATETYPE domain.
+## </summary>
+## </param>
+## <param name="terminal">
+## <summary>
+## The type of the role's terminal.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_run',`
+ gen_require(`
+ type TEMPLATETYPE_t;
+ ')
2007-03-19 14:48:15 +00:00
+
2007-09-10 19:45:03 +00:00
+ TEMPLATETYPE_domtrans($1)
+ role $2 types TEMPLATETYPE_t;
+ dontaudit TEMPLATETYPE_t $3:chr_file rw_term_perms;
2007-03-19 14:48:15 +00:00
+')
2007-08-31 19:10:10 +00:00
+
+"""
+
+if_initscript_rules="""
+########################################
+## <summary>
+## Execute TEMPLATETYPE server in the TEMPLATETYPE domain.
+## </summary>
+## <param name="domain">
+## <summary>
+## The type of the process performing this action.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_script_domtrans',`
+ gen_require(`
+ type TEMPLATETYPE_script_exec_t;
+ ')
+
+ init_script_domtrans_spec($1,TEMPLATETYPE_script_exec_t)
+')
+"""
+
2007-10-16 23:47:15 +00:00
+if_dbus_rules="""
+########################################
+## <summary>
+## Send and receive messages from
+## TEMPLATETYPE over dbus.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_dbus_chat',`
+ gen_require(`
+ type TEMPLATETYPE_t;
+ class dbus send_msg;
+ ')
+
+ allow $1 TEMPLATETYPE_t:dbus send_msg;
+ allow TEMPLATETYPE_t $1:dbus send_msg;
+')
+"""
+
2007-08-31 19:10:10 +00:00
+if_begin_admin="""
+########################################
+## <summary>
2007-11-19 18:18:08 +00:00
+## All of the rules required to administrate
+## an TEMPLATETYPE environment
2007-08-31 19:10:10 +00:00
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+## <param name="role">
+## <summary>
2008-01-21 21:04:52 +00:00
+## The role to be allowed to manage the TEMPLATETYPE domain.
2007-11-19 18:18:08 +00:00
+## </summary>
+## </param>
+## <param name="terminal">
+## <summary>
+## The type of the user terminal.
2007-08-31 19:10:10 +00:00
+## </summary>
+## </param>
+## <rolecap/>
+#
+interface(`TEMPLATETYPE_admin',`
2007-09-06 12:25:31 +00:00
+ gen_require(`
+ type TEMPLATETYPE_t;
+ ')
+
2007-11-19 18:18:08 +00:00
+ allow $1 TEMPLATETYPE_t:process { ptrace signal_perms getattr };
+ read_files_pattern($1, TEMPLATETYPE_t, TEMPLATETYPE_t)
2007-09-06 12:25:31 +00:00
+
2007-08-31 19:10:10 +00:00
+"""
+
+if_initscript_admin="""
2008-01-21 21:04:52 +00:00
+ gen_require(`
+ type TEMPLATETYPE_script_exec_t;
+ ')
+
2007-10-02 20:21:53 +00:00
+ # Allow TEMPLATETYPE_t to restart the apache service
2007-11-19 18:18:08 +00:00
+ TEMPLATETYPE_script_domtrans($1)
+ domain_system_change_exemption($1)
+ role_transition $2 TEMPLATETYPE_script_exec_t system_r;
+ allow $2 system_r;
2007-08-31 19:10:10 +00:00
+"""
+
+if_end_admin="""
+')
2007-03-19 14:48:15 +00:00
+"""
+
+########################### File Context ##################################
2007-08-31 19:10:10 +00:00
+fc_program="""\
2007-03-19 14:48:15 +00:00
+
2007-08-31 19:10:10 +00:00
+EXECUTABLE -- gen_context(system_u:object_r:TEMPLATETYPE_exec_t,s0)
+"""
+fc_initscript="""\
+
+EXECUTABLE -- gen_context(system_u:object_r:TEMPLATETYPE_script_exec_t,s0)
2007-03-19 14:48:15 +00:00
+"""
+
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/__init__.py policycoreutils-2.0.46/gui/templates/__init__.py
2007-03-19 14:48:15 +00:00
--- nsapolicycoreutils/gui/templates/__init__.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/templates/__init__.py 2008-04-06 08:09:08.000000000 -0400
2007-03-19 14:48:15 +00:00
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/network.py policycoreutils-2.0.46/gui/templates/network.py
2007-03-19 14:48:15 +00:00
--- nsapolicycoreutils/gui/templates/network.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/templates/network.py 2008-04-06 08:09:08.000000000 -0400
2007-08-28 15:45:56 +00:00
@@ -0,0 +1,80 @@
+te_port_types="""
2007-03-19 14:48:15 +00:00
+type TEMPLATETYPE_port_t;
2007-06-11 16:47:29 +00:00
+corenet_port(TEMPLATETYPE_port_t)
2007-03-19 14:48:15 +00:00
+"""
+
+te_network="""\
+sysnet_dns_name_resolve(TEMPLATETYPE_t)
2007-08-28 15:45:56 +00:00
+corenet_all_recvfrom_unlabeled(TEMPLATETYPE_t)
2007-03-19 14:48:15 +00:00
+"""
+
+te_tcp="""\
+allow TEMPLATETYPE_t self:tcp_socket create_stream_socket_perms;
+corenet_tcp_sendrecv_all_if(TEMPLATETYPE_t)
+corenet_tcp_sendrecv_all_nodes(TEMPLATETYPE_t)
+corenet_tcp_sendrecv_all_ports(TEMPLATETYPE_t)
+"""
+
+te_in_tcp="""\
+corenet_tcp_bind_all_nodes(TEMPLATETYPE_t)
+"""
+
+te_in_need_port_tcp="""\
+allow TEMPLATETYPE_t TEMPLATETYPE_port_t:tcp_socket name_bind;
+"""
+
+te_out_need_port_tcp="""\
+allow TEMPLATETYPE_t TEMPLATETYPE_port_t:tcp_socket name_connect;
+"""
+
+te_udp="""\
2007-04-18 17:18:15 +00:00
+allow TEMPLATETYPE_t self:udp_socket { create_socket_perms listen };
2007-03-19 14:48:15 +00:00
+corenet_udp_sendrecv_all_if(TEMPLATETYPE_t)
+corenet_udp_sendrecv_all_nodes(TEMPLATETYPE_t)
+corenet_udp_sendrecv_all_ports(TEMPLATETYPE_t)
+"""
+
+te_in_udp="""\
+corenet_udp_bind_all_nodes(TEMPLATETYPE_t)
+"""
+
+te_in_need_port_udp="""\
+allow TEMPLATETYPE_t TEMPLATETYPE_port_t:udp_socket name_bind;
+"""
+
2007-08-28 15:45:56 +00:00
+te_out_all_ports_tcp="""\
+corenet_tcp_connect_all_ports(TEMPLATETYPE_t)
+"""
+
+te_out_reserved_ports_tcp="""\
+corenet_tcp_connect_all_rpc_ports(TEMPLATETYPE_t)
+"""
+
+te_out_unreserved_ports_tcp="""\
+corenet_tcp_connect_all_unreserved_ports(TEMPLATETYPE_t)
+"""
+
+te_in_all_ports_tcp="""\
+corenet_tcp_bind_all_ports(TEMPLATETYPE_t)
+"""
+
+te_in_reserved_ports_tcp="""\
+corenet_tcp_bind_all_rpc_ports(TEMPLATETYPE_t)
+"""
+
+te_in_unreserved_ports_tcp="""\
+corenet_tcp_bind_all_unreserved_ports(TEMPLATETYPE_t)
+"""
+
+te_in_all_ports_udp="""\
+corenet_udp_bind_all_ports(TEMPLATETYPE_t)
+"""
+
+te_in_reserved_ports_udp="""\
+corenet_udp_bind_all_rpc_ports(TEMPLATETYPE_t)
+"""
+
+te_in_unreserved_ports_udp="""\
+corenet_udp_bind_all_unreserved_ports(TEMPLATETYPE_t)
+"""
+
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/rw.py policycoreutils-2.0.46/gui/templates/rw.py
2007-03-19 14:48:15 +00:00
--- nsapolicycoreutils/gui/templates/rw.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/templates/rw.py 2008-04-06 08:09:08.000000000 -0400
2007-08-31 19:10:10 +00:00
@@ -0,0 +1,128 @@
2007-03-19 14:48:15 +00:00
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
+#
+# policygentool is a tool for the initial generation of SELinux policy
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA
+#
+#
+
+########################### tmp Template File #############################
+te_types="""
+type TEMPLATETYPE_rw_t;
2007-05-17 17:46:56 +00:00
+files_type(TEMPLATETYPE_rw_t)
2007-03-19 14:48:15 +00:00
+"""
+
+te_rules="""
+allow TEMPLATETYPE_t TEMPLATETYPE_rw_t:file manage_file_perms;
+allow TEMPLATETYPE_t TEMPLATETYPE_rw_t:dir create_dir_perms;
+"""
+
+########################### Interface File #############################
+if_rules="""
+########################################
+## <summary>
+## Search TEMPLATETYPE rw directories.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_search_rw_dir',`
+ gen_require(`
+ type TEMPLATETYPE_rw_t;
+ ')
+
+ allow $1 TEMPLATETYPE_rw_t:dir search_dir_perms;
+ files_search_rw($1)
+')
+
+########################################
+## <summary>
+## Read TEMPLATETYPE rw files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_read_rw_files',`
+ gen_require(`
+ type TEMPLATETYPE_rw_t;
+ ')
+
+ allow $1 TEMPLATETYPE_rw_t:file r_file_perms;
+ allow $1 TEMPLATETYPE_rw_t:dir list_dir_perms;
+ files_search_rw($1)
+')
+
+########################################
+## <summary>
+## Create, read, write, and delete
+## TEMPLATETYPE rw files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_manage_rw_files',`
+ gen_require(`
+ type TEMPLATETYPE_rw_t;
+ ')
+
+ allow $1 TEMPLATETYPE_rw_t:file manage_file_perms;
+ allow $1 TEMPLATETYPE_rw_t:dir rw_dir_perms;
+')
2007-08-31 19:10:10 +00:00
+
+########################################
+## <summary>
+## Manage TEMPLATETYPE rw files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_manage_rw',`
+ gen_require(`
+ type TEMPLATETYPE_rw_t;
+ ')
+
2007-10-18 21:48:15 +00:00
+ 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)
2007-08-31 19:10:10 +00:00
+')
+
+"""
+
+if_admin_rules="""
2007-11-19 18:18:08 +00:00
+ TEMPLATETYPE_manage_rw($1)
2007-03-19 14:48:15 +00:00
+"""
+
+########################### File Context ##################################
+fc_file="""
+FILENAME -- gen_context(system_u:object_r:TEMPLATETYPE_rw_t,s0)
+"""
+
+fc_dir="""
+FILENAME(/.*)? gen_context(system_u:object_r:TEMPLATETYPE_rw_t,s0)
+"""
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/script.py policycoreutils-2.0.46/gui/templates/script.py
2007-03-19 14:48:15 +00:00
--- nsapolicycoreutils/gui/templates/script.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/templates/script.py 2008-04-06 08:09:08.000000000 -0400
2007-10-16 23:47:15 +00:00
@@ -0,0 +1,91 @@
2007-03-19 14:48:15 +00:00
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
+#
+# policygentool is a tool for the initial generation of SELinux policy
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA
+#
+#
+
+########################### tmp Template File #############################
2007-10-16 23:47:15 +00:00
+compile="""\
2007-03-19 14:48:15 +00:00
+#!/bin/sh
2007-10-16 23:47:15 +00:00
+
+DIRNAME=`dirname $0`
+cd $DIRNAME
+USAGE="$0 [ --update ]"
+if [ `id -u` != 0 ]; then
+echo 'You must be root to run this script'
+exit 1
+fi
+
2007-09-19 02:29:47 +00:00
+if [ ! -f /usr/share/selinux/devel/Makefile ]; then
+echo 'selinux-policy-devel not installed, package required for building policy'
+echo '# yum install selinux-policy-devel'
+exit 1
+fi
2007-10-16 23:47:15 +00:00
+
+if [ $# -eq 1 ]; then
+ if [ "$1" = "--update" ] ; then
2008-02-13 20:55:23 +00:00
+ time=`ls -l --time-style="+%x %X" TEMPLATEFILE.te | awk '{ printf "%s %s", $6, $7 }'`
2007-10-17 01:33:45 +00:00
+ rules=`ausearch --start $time -m avc --raw -se TEMPLATETYPE`
2007-10-16 23:47:15 +00:00
+ if [ x"$rules" != "x" ] ; then
+ echo "Found avc's to update policy with"
+ echo -e "$rules" | audit2allow -R
+ echo "Do you want these changes added to policy [y/n]?"
+ read ANS
+ if [ "$ANS" = "y" -o "$ANS" = "Y" ] ; then
+ echo "Updating policy"
2008-02-13 20:55:23 +00:00
+ echo -e "$rules" | audit2allow -R >> TEMPLATEFILE.te
2007-10-16 23:47:15 +00:00
+ # Fall though and rebuild policy
+ else
+ exit 0
+ fi
+ else
+ echo "No new avcs found"
+ exit 0
+ fi
+ else
+ echo -e $USAGE
+ exit 1
+ fi
+elif [ $# -ge 2 ] ; then
+ echo -e $USAGE
+ exit 1
+fi
+
+echo "Building and Loading Policy"
+set -x
2007-03-19 14:48:15 +00:00
+make -f /usr/share/selinux/devel/Makefile
2008-02-13 20:55:23 +00:00
+/usr/sbin/semodule -i TEMPLATEFILE.pp
2007-03-19 14:48:15 +00:00
+
+"""
+
+restorecon="""\
2007-04-17 12:30:19 +00:00
+/sbin/restorecon -F -R -v FILENAME
2007-03-19 14:48:15 +00:00
+"""
+
+tcp_ports="""\
2007-04-17 12:30:19 +00:00
+/usr/sbin/semanage port -a -t TEMPLATETYPE_port_t -p tcp PORTNUM
2007-03-19 14:48:15 +00:00
+"""
+
+udp_ports="""\
2007-04-17 12:30:19 +00:00
+/usr/sbin/semanage port -a -t TEMPLATETYPE_port_t -p udp PORTNUM
2007-03-19 14:48:15 +00:00
+"""
+
2007-09-06 12:25:31 +00:00
+users="""\
+/usr/sbin/semanage user -a -P TEMPLATETYPE -R "TEMPLATETYPE_rROLES" TEMPLATETYPE_u
+"""
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/semodule.py policycoreutils-2.0.46/gui/templates/semodule.py
2007-03-19 14:48:15 +00:00
--- nsapolicycoreutils/gui/templates/semodule.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/templates/semodule.py 2008-04-06 08:09:08.000000000 -0400
2007-03-19 14:48:15 +00:00
@@ -0,0 +1,41 @@
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
+#
+# policygentool is a tool for the initial generation of SELinux policy
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA
+#
+#
+
+########################### tmp Template File #############################
+compile="""
+#!/bin/sh
+make -f /usr/share/selinux/devel/Makefile
+semodule -i TEMPLATETYPE.pp
+"""
+
+restorecon="""
+restorecon -R -v FILENAME
+"""
+
+tcp_ports="""
+semanage ports -a -t TEMPLATETYPE_port_t -p tcp PORTNUM
+"""
+
+udp_ports="""
+semanage ports -a -t TEMPLATETYPE_port_t -p udp PORTNUM
+"""
+
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/tmp.py policycoreutils-2.0.46/gui/templates/tmp.py
2007-03-19 14:48:15 +00:00
--- nsapolicycoreutils/gui/templates/tmp.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/templates/tmp.py 2008-04-06 08:09:08.000000000 -0400
2007-08-31 19:10:10 +00:00
@@ -0,0 +1,97 @@
2007-03-19 14:48:15 +00:00
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
+#
+# policygentool is a tool for the initial generation of SELinux policy
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA
+#
+#
+########################### tmp Template File #############################
+
+te_types="""
+type TEMPLATETYPE_tmp_t;
+files_tmp_file(TEMPLATETYPE_tmp_t)
+"""
+
+te_rules="""
+allow TEMPLATETYPE_t TEMPLATETYPE_tmp_t:file manage_file_perms;
+allow TEMPLATETYPE_t TEMPLATETYPE_tmp_t:dir create_dir_perms;
2007-08-31 19:10:10 +00:00
+files_tmp_filetrans(TEMPLATETYPE_t,TEMPLATETYPE_tmp_t, { file dir })
2007-03-19 14:48:15 +00:00
+"""
+
+if_rules="""
+########################################
+## <summary>
+## Do not audit attempts to read,
+## TEMPLATETYPE tmp files
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain to not audit.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_dontaudit_read_tmp_files',`
+ gen_require(`
+ type TEMPLATETYPE_tmp_t;
+ ')
+
2007-11-19 21:27:12 +00:00
+ dontaudit $1 TEMPLATETYPE_tmp_t:file read_file_perms;
2007-03-19 14:48:15 +00:00
+')
+
+########################################
+## <summary>
+## Allow domain to read, TEMPLATETYPE tmp files
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain to not audit.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_read_tmp_files',`
+ gen_require(`
+ type TEMPLATETYPE_tmp_t;
+ ')
+
2007-11-19 21:27:12 +00:00
+ allow $1 TEMPLATETYPE_tmp_t:file read_file_perms;
2007-08-31 19:10:10 +00:00
+')
+
+########################################
+## <summary>
+## Allow domain to manage TEMPLATETYPE tmp files
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain to not audit.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_manage_tmp',`
+ gen_require(`
+ type TEMPLATETYPE_tmp_t;
+ ')
+
2007-10-18 21:48:15 +00:00
+ manage_dirs_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)
2007-03-19 14:48:15 +00:00
+')
+"""
2007-08-31 19:10:10 +00:00
+
+if_admin_rules="""
2007-11-19 18:18:08 +00:00
+ TEMPLATETYPE_manage_tmp($1)
2007-08-31 19:10:10 +00:00
+"""
+
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/user.py policycoreutils-2.0.46/gui/templates/user.py
2007-08-28 15:45:56 +00:00
--- nsapolicycoreutils/gui/templates/user.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/templates/user.py 2008-04-06 08:09:08.000000000 -0400
2008-02-13 20:55:23 +00:00
@@ -0,0 +1,182 @@
2007-08-28 15:45:56 +00:00
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
+#
+# policygentool is a tool for the initial generation of SELinux policy
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA
+#
+#
+########################### Type Enforcement File #############################
2007-08-31 19:10:10 +00:00
+
2007-08-28 15:45:56 +00:00
+te_login_user_types="""\
+policy_module(TEMPLATETYPE,1.0.0)
+
+########################################
+#
+# Declarations
+#
+
2008-02-13 20:55:23 +00:00
+userdom_unpriv_user_template(TEMPLATETYPE)
+"""
+
+te_admin_user_types="""\
+policy_module(TEMPLATETYPE,1.0.0)
+
+########################################
+#
+# Declarations
+#
+
+userdom_admin_login_user_template(TEMPLATETYPE)
+"""
+
+te_min_login_user_types="""\
+policy_module(TEMPLATETYPE,1.0.0)
+
+########################################
+#
+# Declarations
+#
+
2007-11-19 18:18:08 +00:00
+userdom_restricted_user_template(TEMPLATETYPE)
2007-08-28 15:45:56 +00:00
+"""
+
+te_x_login_user_types="""\
+policy_module(TEMPLATETYPE,1.0.0)
+
+########################################
+#
+# Declarations
+#
+
2007-11-19 18:18:08 +00:00
+userdom_restricted_xwindows_user_template(TEMPLATETYPE)
2007-08-28 15:45:56 +00:00
+"""
+
2008-02-13 20:55:23 +00:00
+te_existing_user_types="""\
+policy_module(myTEMPLATETYPE,1.0.0)
+
+gen_require(`
+ type TEMPLATETYPE_t, TEMPLATETYPE_devpts_t, TEMPLATETYPE_tty_device_t;
+ role TEMPLATETYPE_r;
+')
+
+"""
+
2007-08-28 15:45:56 +00:00
+te_root_user_types="""\
+
+policy_module(TEMPLATETYPE,1.0.0)
+
+########################################
+#
+# Declarations
+#
+
+userdom_base_user_template(TEMPLATETYPE)
+"""
+
+te_login_user_rules="""\
+
+########################################
+#
+# TEMPLATETYPE local policy
+#
+
+"""
+
2008-02-13 20:55:23 +00:00
+te_existing_user_rules="""\
+
+########################################
+#
+# TEMPLATETYPE customized policy
+#
+
+"""
+
2007-08-28 15:45:56 +00:00
+te_x_login_user_rules="""\
+
+########################################
+#
+# TEMPLATETYPE local policy
+#
+
+"""
+
+te_root_user_rules="""\
+
+########################################
+#
+# TEMPLATETYPE local policy
+#
+
+"""
+
+te_transition_rules="""
+optional_policy(`
+ APPLICATION_per_role_template(TEMPLATETYPE,TEMPLATETYPE_t,TEMPLATETYPE_r)
+')
+"""
+
2007-08-31 19:10:10 +00:00
+te_admin_rules="""
2007-09-06 12:25:31 +00:00
+allow TEMPLATETYPE_t self:capability { dac_override dac_read_search kill sys_ptrace sys_nice };
+files_dontaudit_search_all_dirs(TEMPLATETYPE_t)
+
+selinux_get_enforce_mode(TEMPLATETYPE_t)
2007-09-10 15:59:05 +00:00
+seutil_domtrans_setfiles(TEMPLATETYPE_t)
+seutil_search_default_contexts(TEMPLATETYPE_t)
2007-09-06 12:25:31 +00:00
+
+logging_send_syslog_msg(TEMPLATETYPE_t)
+
+kernel_read_system_state(TEMPLATETYPE_t)
+
+domain_dontaudit_search_all_domains_state(TEMPLATETYPE_t)
+domain_dontaudit_ptrace_all_domains(TEMPLATETYPE_t)
+
+userdom_dontaudit_search_sysadm_home_dirs(TEMPLATETYPE_t)
+userdom_dontaudit_search_generic_user_home_dirs(TEMPLATETYPE_t)
+
+bool TEMPLATETYPE_read_user_files false;
+bool TEMPLATETYPE_manage_user_files false;
+
+if (TEMPLATETYPE_read_user_files) {
+ userdom_read_unpriv_users_home_content_files(TEMPLATETYPE_t)
+ userdom_read_unpriv_users_tmp_files(TEMPLATETYPE_t)
+}
+
+if (TEMPLATETYPE_manage_user_files) {
+ userdom_manage_unpriv_users_home_content_dirs(TEMPLATETYPE_t)
+ userdom_read_unpriv_users_tmp_files(TEMPLATETYPE_t)
+ userdom_write_unpriv_users_tmp_files(TEMPLATETYPE_t)
+}
+
+"""
+
2008-02-06 15:19:11 +00:00
+te_admin_trans_rules="""
+userdom_role_change_template(USER, TEMPLATETYPE)
+"""
+
2007-09-06 12:25:31 +00:00
+te_admin_domain_rules="""
2007-08-31 19:10:10 +00:00
+optional_policy(`
2007-11-19 18:18:08 +00:00
+ APPLICATION_admin(TEMPLATETYPE_t,TEMPLATETYPE_r,{ TEMPLATETYPE_devpts_t TEMPLATETYPE_tty_device_t })
2007-08-31 19:10:10 +00:00
+')
+"""
+
2007-09-06 12:25:31 +00:00
+te_roles_rules="""
+userdom_role_change_template(TEMPLATETYPE, ROLE)
+"""
+
+te_newrole_rules="""
+seutil_run_newrole(TEMPLATETYPE_t,TEMPLATETYPE_r,{ TEMPLATETYPE_devpts_t TEMPLATETYPE_tty_device_t })
+"""
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_lib.py policycoreutils-2.0.46/gui/templates/var_lib.py
2007-03-19 14:48:15 +00:00
--- nsapolicycoreutils/gui/templates/var_lib.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/templates/var_lib.py 2008-04-06 08:09:08.000000000 -0400
2007-11-19 21:27:12 +00:00
@@ -0,0 +1,158 @@
2007-03-19 14:48:15 +00:00
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
+#
+# policygentool is a tool for the initial generation of SELinux policy
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA
+#
+#
+########################### var_lib Template File #############################
+
+########################### Type Enforcement File #############################
+te_types="""
+type TEMPLATETYPE_var_lib_t;
+files_type(TEMPLATETYPE_var_lib_t)
+"""
+te_rules="""
2007-11-19 21:27:12 +00:00
+manage_dirs_pattern(TEMPLATETYPE_t, TEMPLATETYPE_var_lib_t, TEMPLATETYPE_var_lib_t)
+manage_files_pattern(TEMPLATETYPE_t, TEMPLATETYPE_var_lib_t, TEMPLATETYPE_var_lib_t)
+files_var_lib_filetrans(TEMPLATETYPE_t, TEMPLATETYPE_var_lib_t, { file dir } )
2007-04-18 17:18:15 +00:00
+"""
+
+te_stream_rules="""\
2007-11-19 21:27:12 +00:00
+allow TEMPLATETYPE_t TEMPLATETYPE_var_lib_t:sock_file manage_sock_file_perms;
2007-08-31 19:10:10 +00:00
+files_var_lib_filetrans(TEMPLATETYPE_t,TEMPLATETYPE_var_lib_t, sock_file)
2007-03-19 14:48:15 +00:00
+"""
+
2007-04-18 17:18:15 +00:00
+
2007-03-19 14:48:15 +00:00
+########################### Interface File #############################
+if_rules="""
+########################################
+## <summary>
+## Search TEMPLATETYPE lib directories.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_search_lib',`
+ gen_require(`
+ type TEMPLATETYPE_var_lib_t;
+ ')
+
+ allow $1 TEMPLATETYPE_var_lib_t:dir search_dir_perms;
+ files_search_var_lib($1)
+')
+
+########################################
+## <summary>
+## Read TEMPLATETYPE lib files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_read_lib_files',`
+ gen_require(`
+ type TEMPLATETYPE_var_lib_t;
+ ')
+
+ files_search_var_lib($1)
2007-11-19 21:27:12 +00:00
+ read_files_pattern($1, TEMPLATETYPE_var_lib_t, TEMPLATETYPE_var_lib_t)
2007-03-19 14:48:15 +00:00
+')
+
+########################################
+## <summary>
+## Create, read, write, and delete
+## TEMPLATETYPE lib files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_manage_lib_files',`
+ gen_require(`
+ type TEMPLATETYPE_var_lib_t;
+ ')
+
+ files_search_var_lib($1)
2007-11-19 21:27:12 +00:00
+ manage_files_pattern($1, TEMPLATETYPE_var_lib_t, TEMPLATETYPE_var_lib_t)
2007-03-19 14:48:15 +00:00
+')
2007-08-31 19:10:10 +00:00
+
+########################################
+## <summary>
+## Manage TEMPLATETYPE var_lib files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_manage_var_lib',`
+ gen_require(`
+ type TEMPLATETYPE_var_lib_t;
+ ')
+
2007-10-18 21:48:15 +00:00
+ manage_dirs_pattern($1,TEMPLATETYPE_var_lib_t,TEMPLATETYPE_var_lib_t)
+ manage_files_pattern($1,TEMPLATETYPE_var_lib_t,TEMPLATETYPE_var_lib_t)
+ manage_lnk_files_pattern($1,TEMPLATETYPE_var_lib_t,TEMPLATETYPE_var_lib_t)
2007-08-31 19:10:10 +00:00
+')
+
2007-03-19 14:48:15 +00:00
+"""
2007-04-18 17:18:15 +00:00
+
+if_stream_rules="""
+########################################
+## <summary>
+## Connect to TEMPLATETYPE over an unix stream socket.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_stream_connect',`
+ gen_require(`
+ type TEMPLATETYPE_t, TEMPLATETYPE_var_lib_t;
+ ')
+
2007-11-19 21:27:12 +00:00
+ stream_connect_pattern($1, TEMPLATETYPE_var_lib_t, TEMPLATETYPE_var_lib_t)
2007-04-18 17:18:15 +00:00
+')
+"""
+
2007-08-31 19:10:10 +00:00
+if_admin_rules="""
2007-11-19 18:18:08 +00:00
+ TEMPLATETYPE_manage_var_lib($1)
2007-08-31 19:10:10 +00:00
+"""
+
2007-03-19 14:48:15 +00:00
+########################### File Context ##################################
+fc_file="""\
+FILENAME -- gen_context(system_u:object_r:TEMPLATETYPE_var_lib_t,s0)
+"""
+
2007-04-18 17:18:15 +00:00
+fc_sock_file="""\
+FILENAME -s gen_context(system_u:object_r:TEMPLATETYPE_var_lib_t,s0)
+"""
+
2007-03-19 14:48:15 +00:00
+fc_dir="""\
+FILENAME(/.*)? gen_context(system_u:object_r:TEMPLATETYPE_var_lib_t,s0)
+"""
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_log.py policycoreutils-2.0.46/gui/templates/var_log.py
2007-03-19 14:48:15 +00:00
--- nsapolicycoreutils/gui/templates/var_log.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/templates/var_log.py 2008-04-06 08:09:08.000000000 -0400
2007-10-31 10:57:59 +00:00
@@ -0,0 +1,110 @@
2007-03-19 14:48:15 +00:00
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
+#
+# policygentool is a tool for the initial generation of SELinux policy
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA
+#
+#
+########################### var_log Template File #############################
+
+########################### Type Enforcement File #############################
+te_types="""
+type TEMPLATETYPE_log_t;
+logging_log_file(TEMPLATETYPE_log_t)
+"""
+
+te_rules="""
2007-11-19 21:27:12 +00:00
+manage_dirs_pattern(TEMPLATETYPE_t, TEMPLATETYPE_log_t, TEMPLATETYPE_log_t)
+manage_files_pattern(TEMPLATETYPE_t, TEMPLATETYPE_log_t, TEMPLATETYPE_log_t)
+logging_log_filetrans(TEMPLATETYPE_t, TEMPLATETYPE_log_t, { file dir } )
2007-03-19 14:48:15 +00:00
+"""
+
+########################### Interface File #############################
+if_rules="""
+########################################
+## <summary>
+## Allow the specified domain to read TEMPLATETYPE's log files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+## <rolecap/>
+#
+interface(`TEMPLATETYPE_read_log',`
+ gen_require(`
+ type TEMPLATETYPE_log_t;
+ ')
+
+ logging_search_logs($1)
2007-10-31 10:57:59 +00:00
+ read_files_pattern($1, TEMPLATETYPE_log_t, TEMPLATETYPE_log_t)
2007-03-19 14:48:15 +00:00
+')
+
+########################################
+## <summary>
+## Allow the specified domain to append
+## TEMPLATETYPE log files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed to transition.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_append_log',`
+ gen_require(`
+ type var_log_t, TEMPLATETYPE_log_t;
+ ')
+
+ logging_search_logs($1)
2007-10-31 10:57:59 +00:00
+ append_files_pattern($1, TEMPLATETYPE_log_t, TEMPLATETYPE_log_t)
2007-03-19 14:48:15 +00:00
+')
+
2007-08-31 19:10:10 +00:00
+########################################
+## <summary>
+## Allow domain to manage TEMPLATETYPE log files
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain to not audit.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_manage_log',`
+ gen_require(`
+ type TEMPLATETYPE_log_t;
+ ')
+
2007-10-18 21:48:15 +00:00
+ manage_dirs_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)
2007-08-31 19:10:10 +00:00
+')
+"""
+
+if_admin_rules="""
2007-11-19 18:18:08 +00:00
+ TEMPLATETYPE_manage_log($1)
2007-03-19 14:48:15 +00:00
+"""
+
+########################### File Context ##################################
+fc_file="""\
+FILENAME -- gen_context(system_u:object_r:TEMPLATETYPE_log_t,s0)
+"""
+
+fc_dir="""\
+FILENAME(/.*)? gen_context(system_u:object_r:TEMPLATETYPE_log_t,s0)
+"""
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_run.py policycoreutils-2.0.46/gui/templates/var_run.py
2007-03-19 14:48:15 +00:00
--- nsapolicycoreutils/gui/templates/var_run.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/templates/var_run.py 2008-04-06 08:09:08.000000000 -0400
2007-11-19 21:27:12 +00:00
@@ -0,0 +1,118 @@
2007-03-19 14:48:15 +00:00
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
+#
+# policygentool is a tool for the initial generation of SELinux policy
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA
+#
+#
+########################### var_run Template File #############################
+
+te_types="""
+type TEMPLATETYPE_var_run_t;
+files_pid_file(TEMPLATETYPE_var_run_t)
+"""
+
+te_rules="""
2007-11-19 21:27:12 +00:00
+manage_dirs_pattern(TEMPLATETYPE_t, TEMPLATETYPE_var_run_t, TEMPLATETYPE_var_run_t)
+manage_files_pattern(TEMPLATETYPE_t, TEMPLATETYPE_var_run_t, TEMPLATETYPE_var_run_t)
2007-04-18 17:18:15 +00:00
+files_pid_filetrans(TEMPLATETYPE_t,TEMPLATETYPE_var_run_t, { file dir })
2007-03-19 14:48:15 +00:00
+"""
+
+te_stream_rules="""
2007-11-19 21:27:12 +00:00
+allow TEMPLATETYPE_t TEMPLATETYPE_var_run_t:sock_file manage_sock_file_perms;
2007-03-19 14:48:15 +00:00
+files_pid_filetrans(TEMPLATETYPE_t,TEMPLATETYPE_var_run_t, sock_file)
+"""
+
+if_rules="""
+########################################
+## <summary>
+## Read TEMPLATETYPE PID files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_read_pid_files',`
+ gen_require(`
+ type TEMPLATETYPE_var_run_t;
+ ')
+
+ files_search_pids($1)
2007-11-19 21:27:12 +00:00
+ allow $1 TEMPLATETYPE_var_run_t:file read_file_perms;
2007-03-19 14:48:15 +00:00
+')
+
2007-08-31 19:10:10 +00:00
+########################################
+## <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;
+ ')
+
2007-10-18 21:48:15 +00:00
+ 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)
2007-08-31 19:10:10 +00:00
+')
+
2007-03-19 14:48:15 +00:00
+"""
+
2007-04-18 17:18:15 +00:00
+if_stream_rules="""\
2007-03-19 14:48:15 +00:00
+########################################
+## <summary>
+## Connect to TEMPLATETYPE over an unix stream socket.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_stream_connect',`
+ gen_require(`
+ type TEMPLATETYPE_t, TEMPLATETYPE_var_run_t;
+ ')
+
+ files_search_pids($1)
2007-11-19 21:27:12 +00:00
+ stream_connect_pattern($1, TEMPLATETYPE_var_run_t, TEMPLATETYPE_var_run_t)
2007-03-19 14:48:15 +00:00
+')
+"""
+
2007-08-31 19:10:10 +00:00
+if_admin_rules="""
2007-11-19 18:18:08 +00:00
+ TEMPLATETYPE_manage_var_run($1)
2007-08-31 19:10:10 +00:00
+"""
+
2007-03-19 14:48:15 +00:00
+fc_file="""\
+FILENAME -- gen_context(system_u:object_r:TEMPLATETYPE_var_run_t,s0)
+"""
+
2007-04-18 17:18:15 +00:00
+fc_sock_file="""\
+FILENAME -s gen_context(system_u:object_r:TEMPLATETYPE_var_run_t,s0)
+"""
+
2007-03-19 14:48:15 +00:00
+fc_dir="""\
+FILENAME(/.*)? gen_context(system_u:object_r:TEMPLATETYPE_var_run_t,s0)
+"""
+
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_spool.py policycoreutils-2.0.46/gui/templates/var_spool.py
2007-03-19 14:48:15 +00:00
--- nsapolicycoreutils/gui/templates/var_spool.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/templates/var_spool.py 2008-04-06 08:09:08.000000000 -0400
2007-11-19 21:27:12 +00:00
@@ -0,0 +1,129 @@
2007-03-19 14:48:15 +00:00
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
+#
+# policygentool is a tool for the initial generation of SELinux policy
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA
+#
+#
+########################### var_spool Template File #############################
+
+########################### Type Enforcement File #############################
+te_types="""
+type TEMPLATETYPE_spool_t;
+files_type(TEMPLATETYPE_spool_t)
+"""
+te_rules="""
+allow TEMPLATETYPE_t TEMPLATETYPE_spool_t:dir manage_dir_perms;
+allow TEMPLATETYPE_t TEMPLATETYPE_spool_t:file manage_file_perms;
+allow TEMPLATETYPE_t TEMPLATETYPE_spool_t:sock_file create_file_perms;
+files_spool_filetrans(TEMPLATETYPE_t,TEMPLATETYPE_spool_t, { file dir sock_file })
+"""
+
+########################### Interface File #############################
+if_rules="""
+########################################
+## <summary>
+## Search TEMPLATETYPE spool directories.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_search_spool',`
+ gen_require(`
+ type TEMPLATETYPE_spool_t;
+ ')
+
+ allow $1 TEMPLATETYPE_spool_t:dir search_dir_perms;
+ files_search_spool($1)
+')
+
+########################################
+## <summary>
+## Read TEMPLATETYPE spool files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_read_spool_files',`
+ gen_require(`
+ type TEMPLATETYPE_spool_t;
+ ')
+
+ files_search_spool($1)
2007-11-19 21:27:12 +00:00
+ read_files_pattern($1, TEMPLATETYPE_spool_t TEMPLATETYPE_spool_t)
2007-03-19 14:48:15 +00:00
+')
+
+########################################
+## <summary>
+## Create, read, write, and delete
+## TEMPLATETYPE spool files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_manage_spool_files',`
+ gen_require(`
+ type TEMPLATETYPE_spool_t;
+ ')
+
+ files_search_spool($1)
2007-11-19 21:27:12 +00:00
+ manage_files_pattern($1,TEMPLATETYPE_spool_t,TEMPLATETYPE_spool_t)
2007-03-19 14:48:15 +00:00
+')
2007-08-31 19:10:10 +00:00
+
+########################################
+## <summary>
+## Allow domain to manage TEMPLATETYPE spool files
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain to not audit.
+## </summary>
+## </param>
+#
+interface(`TEMPLATETYPE_manage_spool',`
+ gen_require(`
+ type TEMPLATETYPE_spool_t;
+ ')
+
2007-10-18 21:48:15 +00:00
+ manage_dirs_pattern($1,TEMPLATETYPE_spool_t,TEMPLATETYPE_spool_t)
+ manage_files_pattern($1,TEMPLATETYPE_spool_t,TEMPLATETYPE_spool_t)
+ manage_lnk_files_pattern($1,TEMPLATETYPE_spool_t,TEMPLATETYPE_spool_t)
2007-08-31 19:10:10 +00:00
+')
+
+"""
+
+if_admin_rules="""
2007-11-19 18:18:08 +00:00
+ TEMPLATETYPE_manage_spool($1)
2007-03-19 14:48:15 +00:00
+"""
2007-08-31 19:10:10 +00:00
+
2007-03-19 14:48:15 +00:00
+########################### File Context ##################################
+fc_file="""\
+FILENAME -- gen_context(system_u:object_r:TEMPLATETYPE_spool_t,s0)
+"""
+
+fc_dir="""\
+FILENAME(/.*)? gen_context(system_u:object_r:TEMPLATETYPE_spool_t,s0)
+"""
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/translationsPage.py policycoreutils-2.0.46/gui/translationsPage.py
2007-02-20 14:57:59 +00:00
--- nsapolicycoreutils/gui/translationsPage.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/translationsPage.py 2008-04-06 08:09:08.000000000 -0400
2007-09-11 19:04:32 +00:00
@@ -0,0 +1,118 @@
2007-02-20 14:57:59 +00:00
+## translationsPage.py - show selinux translations
+## Copyright (C) 2006 Red Hat, Inc.
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+## Author: Dan Walsh
+import string
+import gtk
+import gtk.glade
+import os
+import gobject
+import sys
+import seobject
+from semanagePage import *;
+
+##
+## I18N
+##
+PROGNAME="policycoreutils"
+import gettext
+gettext.bindtextdomain(PROGNAME, "/usr/share/locale")
+gettext.textdomain(PROGNAME)
+try:
+ gettext.install(PROGNAME, localedir="/usr/share/locale", unicode=1)
+except IOError:
+ import __builtin__
+ __builtin__.__dict__['_'] = unicode
+
+class translationsPage(semanagePage):
+ def __init__(self, xml):
+ semanagePage.__init__(self, xml, "translations", _("Translation"))
2007-06-11 16:47:29 +00:00
+ self.firstTime = False
+
+ self.translation_filter = xml.get_widget("translationsFilterEntry")
+ self.translation_filter.connect("focus_out_event", self.filter_changed)
+ self.translation_filter.connect("activate", self.filter_changed)
+
2007-02-20 14:57:59 +00:00
+ self.store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING)
+ self.view.set_model(self.store)
+ self.store.set_sort_column_id(0, gtk.SORT_ASCENDING)
+ col = gtk.TreeViewColumn(_("Sensitvity Level"), gtk.CellRendererText(), text = 0)
+ col.set_sort_column_id(0)
2007-03-19 14:48:15 +00:00
+ col.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
2007-02-20 14:57:59 +00:00
+ col.set_resizable(True)
2007-03-19 14:48:15 +00:00
+ col.set_fixed_width(250)
2007-02-20 14:57:59 +00:00
+ self.view.append_column(col)
+ col = gtk.TreeViewColumn(_("Translation"), gtk.CellRendererText(), text = 1)
+ col.set_sort_column_id(1)
+ col.set_resizable(True)
+ self.view.append_column(col)
+
+ self.load()
+ self.translationsLevelEntry = xml.get_widget("translationsLevelEntry")
+ self.translationsEntry = xml.get_widget("translationsEntry")
+
2007-06-11 16:47:29 +00:00
+ def load(self, filter = ""):
+ self.filter = filter
2007-02-20 14:57:59 +00:00
+ self.translation = seobject.setransRecords()
+ dict = self.translation.get_all()
+ keys = dict.keys()
+ keys.sort()
+ self.store.clear()
+ for k in keys:
2007-06-11 16:47:29 +00:00
+ if not (self.match(k, filter) or self.match(dict[k], filter)):
+ continue
2007-02-20 14:57:59 +00:00
+ iter = self.store.append()
+ self.store.set_value(iter, 0, k)
+ self.store.set_value(iter, 1, dict[k])
+ self.view.get_selection().select_path ((0,))
+
+ def dialogInit(self):
+ store, iter = self.view.get_selection().get_selected()
+ self.translationsLevelEntry.set_text(store.get_value(iter, 0))
+ self.translationsLevelEntry.set_sensitive(False)
+ self.translationsEntry.set_text(store.get_value(iter, 1))
+
+ def dialogClear(self):
+ self.translationsLevelEntry.set_text("")
+ self.translationsLevelEntry.set_sensitive(True)
+ self.translationsEntry.set_text("")
+
+ def delete(self):
+ store, iter = self.view.get_selection().get_selected()
+ try:
+ level = store.get_value(iter, 0)
+ self.translation.delete(level)
+ store.remove(iter)
+ self.view.get_selection().select_path ((0,))
+ except ValueError, e:
+ self.error(e.args[0])
+
+ def add(self):
+ level = self.translationsLevelEntry.get_text().strip()
+ translation = self.translationsEntry.get_text().strip()
+ self.translation.add(level, translation)
+ iter = self.store.append()
+ self.store.set_value(iter, 0, level)
+ self.store.set_value(iter, 1, translation)
+
+ def modify(self):
+ level = self.translationsLevelEntry.get_text().strip()
+ translation = self.translationsEntry.get_text().strip()
+ self.translation.modify(level, translation)
+ store, iter = self.view.get_selection().get_selected()
+ self.store.set_value(iter, 0, level)
+ self.store.set_value(iter, 1, translation)
2008-03-20 12:43:37 +00:00
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/usersPage.py policycoreutils-2.0.46/gui/usersPage.py
2007-02-20 14:57:59 +00:00
--- nsapolicycoreutils/gui/usersPage.py 1969-12-31 19:00:00.000000000 -0500
2008-04-08 13:54:34 +00:00
+++ policycoreutils-2.0.46/gui/usersPage.py 2008-04-06 08:09:08.000000000 -0400
2008-03-20 12:43:37 +00:00
@@ -0,0 +1,150 @@
2007-02-20 14:57:59 +00:00
+## usersPage.py - show selinux mappings
2008-03-20 12:43:37 +00:00
+## Copyright (C) 2006,2007,2008 Red Hat, Inc.
2007-02-20 14:57:59 +00:00
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+## Author: Dan Walsh
+import string
+import gtk
+import gtk.glade
+import os
+import gobject
+import sys
2007-03-19 14:48:15 +00:00
+import commands
2007-02-20 14:57:59 +00:00
+import seobject
+from semanagePage import *;
+
+##
+## I18N
+##
+PROGNAME="policycoreutils"
+import gettext
+gettext.bindtextdomain(PROGNAME, "/usr/share/locale")
+gettext.textdomain(PROGNAME)
+try:
+ gettext.install(PROGNAME, localedir="/usr/share/locale", unicode=1)
+except IOError:
+ import __builtin__
+ __builtin__.__dict__['_'] = unicode
+
+class usersPage(semanagePage):
+ def __init__(self, xml):
+ semanagePage.__init__(self, xml, "users", "SELinux User")
2007-06-13 20:59:11 +00:00
+
2007-02-20 14:57:59 +00:00
+ self.store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING)
+ self.view.set_model(self.store)
+ self.store.set_sort_column_id(0, gtk.SORT_ASCENDING)
+
+ col = gtk.TreeViewColumn(_("SELinux\nUser"), gtk.CellRendererText(), text = 0)
+ col.set_sort_column_id(0)
+ col.set_resizable(True)
+ self.view.append_column(col)
+
2008-03-20 12:43:37 +00:00
+ col = gtk.TreeViewColumn(_("MLS/\nMCS Range"), gtk.CellRendererText(), text = 1)
2007-02-20 14:57:59 +00:00
+ col.set_resizable(True)
+ self.view.append_column(col)
+
2008-03-20 12:43:37 +00:00
+ col = gtk.TreeViewColumn(_("SELinux Roles"), gtk.CellRendererText(), text = 2)
2007-02-20 14:57:59 +00:00
+ col.set_resizable(True)
+ self.view.append_column(col)
+
+ self.load()
+ self.selinuxUserEntry = xml.get_widget("selinuxUserEntry")
+ self.mlsRangeEntry = xml.get_widget("mlsRangeEntry")
+ self.selinuxRolesEntry = xml.get_widget("selinuxRolesEntry")
+
2007-06-13 20:59:11 +00:00
+ def load(self, filter = ""):
+ self.filter=filter
2007-02-20 14:57:59 +00:00
+ self.user = seobject.seluserRecords()
+ dict = self.user.get_all()
+ keys = dict.keys()
+ keys.sort()
+ self.store.clear()
+ for k in keys:
2007-06-13 20:59:11 +00:00
+ range = seobject.translate(dict[k][2])
2008-03-20 12:43:37 +00:00
+ if not (self.match(k, filter) or self.match(dict[k][0], filter) or self.match(range, filter) or self.match(dict[k][3], filter)):
2007-06-13 20:59:11 +00:00
+ continue
+
2007-02-20 14:57:59 +00:00
+ iter = self.store.append()
+ self.store.set_value(iter, 0, k)
2008-03-20 12:43:37 +00:00
+ self.store.set_value(iter, 1, range)
+ self.store.set_value(iter, 2, dict[k][3])
2007-02-20 14:57:59 +00:00
+ self.view.get_selection().select_path ((0,))
+
+ def delete(self):
+ if semanagePage.delete(self) == gtk.RESPONSE_NO:
+ return None
+
+ def dialogInit(self):
+ store, iter = self.view.get_selection().get_selected()
+ self.selinuxUserEntry.set_text(store.get_value(iter, 0))
+ self.selinuxUserEntry.set_sensitive(False)
2008-03-20 12:43:37 +00:00
+ self.mlsRangeEntry.set_text(store.get_value(iter, 1))
+ self.selinuxRolesEntry.set_text(store.get_value(iter, 2))
2007-02-20 14:57:59 +00:00
+
+ def dialogClear(self):
+ self.selinuxUserEntry.set_text("")
+ self.selinuxUserEntry.set_sensitive(True)
+ self.mlsRangeEntry.set_text("s0")
+ self.selinuxRolesEntry.set_text("")
+
+ def add(self):
+ user = self.selinuxUserEntry.get_text()
+ range = self.mlsRangeEntry.get_text()
+ roles = self.selinuxRolesEntry.get_text()
+
2007-11-05 21:30:56 +00:00
+ self.wait()
2008-03-20 12:43:37 +00:00
+ (rc, out) = commands.getstatusoutput("semanage user -a -R '%s' -r %s %s" % (roles, range, user))
2007-11-05 21:30:56 +00:00
+ self.ready()
2007-03-19 14:48:15 +00:00
+ if rc != 0:
+ self.error(out)
+ return False
2007-02-20 14:57:59 +00:00
+ iter = self.store.append()
+ self.store.set_value(iter, 0, user)
2008-03-20 12:43:37 +00:00
+ self.store.set_value(iter, 1, range)
+ self.store.set_value(iter, 2, roles)
2007-02-20 14:57:59 +00:00
+
+ def modify(self):
+ user = self.selinuxUserEntry.get_text()
+ range = self.mlsRangeEntry.get_text()
+ roles = self.selinuxRolesEntry.get_text()
+
2007-11-05 21:30:56 +00:00
+ self.wait()
2008-03-20 12:43:37 +00:00
+ (rc, out) = commands.getstatusoutput("semanage user -m -R '%s' -r %s %s" % (roles, range, user))
2007-11-05 21:30:56 +00:00
+ self.ready()
2007-03-19 14:48:15 +00:00
+
+ if rc != 0:
+ self.error(out)
+ return False
2008-03-20 12:43:37 +00:00
+ self.load(self.filter)
2007-02-20 14:57:59 +00:00
+
+ def delete(self):
+ store, iter = self.view.get_selection().get_selected()
+ try:
+ user=store.get_value(iter, 0)
+ if user == "root" or user == "user_u":
+ raise ValueError(_("SELinux user '%s' is required") % user)
+
2007-11-05 21:30:56 +00:00
+ self.wait()
2007-03-19 14:48:15 +00:00
+ (rc, out) = commands.getstatusoutput("semanage user -d %s" % user)
2007-11-05 21:30:56 +00:00
+ self.ready()
2007-03-19 14:48:15 +00:00
+ if rc != 0:
+ self.error(out)
+ return False
2007-02-20 14:57:59 +00:00
+ store.remove(iter)
+ self.view.get_selection().select_path ((0,))
+ except ValueError, e:
+ self.error(e.args[0])
+