diff options
| author | Jeremy Katz <katzj@redhat.com> | 2004-03-17 04:34:33 +0000 |
|---|---|---|
| committer | Jeremy Katz <katzj@redhat.com> | 2004-03-17 04:34:33 +0000 |
| commit | 3ab4e12e76e4cd6fcfc785cce78c0d8c8bee720e (patch) | |
| tree | 061ddfcedb0a9dddf0245c77fa5cdbde6a528717 | |
| parent | 15b2c4bb9be3be44d0362c14ec793095084291f5 (diff) | |
crappy pass at text mode selinux configuration so that there's at least
something
| -rw-r--r-- | text.py | 3 | ||||
| -rw-r--r-- | textw/firewall_text.py | 48 |
2 files changed, 50 insertions, 1 deletions
@@ -58,7 +58,8 @@ stepToClasses = { "BootloaderLocationWindow")), "network" : ("network_text", ("NetworkDeviceWindow", "NetworkGlobalWindow", "HostnameWindow")), - "firewall" : ("firewall_text", "FirewallWindow"), + "firewall" : ("firewall_text", ("FirewallWindow", + "SELinuxWindow")), "languagesupport" : ("language_text", ("LanguageSupportWindow", "LanguageDefaultWindow")), "timezone" : ("timezone_text", "TimezoneWindow"), diff --git a/textw/firewall_text.py b/textw/firewall_text.py index be780fc25..bb175ab55 100644 --- a/textw/firewall_text.py +++ b/textw/firewall_text.py @@ -16,6 +16,7 @@ from snack import * from constants_text import * from rhpl.translate import _ +from rhpl.log import log class FirewallWindow: def __call__(self, screen, intf, network, firewall, security): @@ -236,3 +237,50 @@ class FirewallWindow: else: raise RuntimeError, "never reached" + + +class SELinuxWindow: + def __call__(self, screen, intf, network, firewall, security): + self.intf = intf + + toplevel = GridFormHelp (screen, _("Security Enhanced Linux"), + "selinux", 1, 5) + text = _("Security Enhanced Linux (SELinux) provides stricter access " + "controls to improve the security of your system. How would " + "you like this support enabled?") + + toplevel.add(TextboxReflowed(50, text), 0, 0, (0,0,0,1)) + + + grid = Grid(3, 1) + disable = SingleRadioButton(_("Disable SELinux"), None, (security.getSELinux() == 0)) + toplevel.add(disable, 0, 1, (0,0,0,0)) + warn = SingleRadioButton(_("Warn on violations"), disable, (security.getSELinux() == 1)) + toplevel.add(warn, 0, 2, (0,0,0,0)) + enable = SingleRadioButton(_("Active"), warn, (security.getSELinux() == 2)) + toplevel.add(enable, 0, 3, (0,0,0,1)) + + bb = ButtonBar (screen, (TEXT_OK_BUTTON, TEXT_BACK_BUTTON)) + toplevel.add(bb, 0, 4, (0, 0, 0, 0), growx = 1) + + while 1: + result = toplevel.run() + + rc = bb.buttonPressed (result) + + if rc == TEXT_BACK_CHECK: + screen.popWindow() + return INSTALL_BACK + + break + + if enable.selected(): + security.setSELinux(2) + elif warn.selected(): + security.setSELinux(1) + elif disable.selected(): + security.setSELinux(0) + + screen.popWindow() + return INSTALL_OK + |
