Class: Installation::Widgets::SelinuxMode
- Inherits:
-
CWM::ComboBox
- Object
- CWM::ComboBox
- Installation::Widgets::SelinuxMode
- Defined in:
- src/lib/installation/widgets/selinux_mode.rb
Overview
Widget to set SELinux mode
Instance Method Summary collapse
- #help ⇒ Object
- #init ⇒ Object
-
#initialize(settings) ⇒ SelinuxMode
constructor
A new instance of SelinuxMode.
- #items ⇒ Object
- #label ⇒ Object
- #store ⇒ Object
Constructor Details
#initialize(settings) ⇒ SelinuxMode
Returns a new instance of SelinuxMode.
27 28 29 30 31 32 |
# File 'src/lib/installation/widgets/selinux_mode.rb', line 27 def initialize(settings) super() textdomain "installation" @settings = settings end |
Instance Method Details
#help ⇒ Object
51 52 53 54 55 56 57 58 59 60 61 |
# File 'src/lib/installation/widgets/selinux_mode.rb', line 51 def help _( "<p>Sets default SELinux mode. Modes are: <ul>" \ "<li><b>Enforcing</b> the state that enforces SELinux security policy. "\ "Access is denied to users and programs unless permitted by " \ "SELinux security policy rules. All denial messages are logged.</li> "\ "<li><b>Permissive</b> is a diagnostic state. The security policy rules are " \ "not enforced, but SELinux sends denial messages to a log file.</li>" \ "<li><b>Disabled</b> SELinux does not enforce a security policy.</li></ul></p>" ) end |
#init ⇒ Object
42 43 44 45 |
# File 'src/lib/installation/widgets/selinux_mode.rb', line 42 def init self.value = @settings.mode.id.to_s disable unless @settings.configurable? end |
#items ⇒ Object
38 39 40 |
# File 'src/lib/installation/widgets/selinux_mode.rb', line 38 def items @settings.modes.map { |m| [m.id.to_s, m.to_human_string] } end |
#label ⇒ Object
34 35 36 |
# File 'src/lib/installation/widgets/selinux_mode.rb', line 34 def label _("SELinux Mode") end |
#store ⇒ Object
47 48 49 |
# File 'src/lib/installation/widgets/selinux_mode.rb', line 47 def store @settings.mode = value.to_sym end |