Class: DInstaller::Security
- Inherits:
-
Object
- Object
- DInstaller::Security
- Defined in:
- lib/dinstaller/security.rb
Overview
Backend class between dbus service and yast code
Instance Attribute Summary collapse
- #logger ⇒ Logger readonly
Instance Method Summary collapse
-
#initialize(logger, config) ⇒ Security
constructor
A new instance of Security.
- #probe ⇒ Object
- #write ⇒ Object
Constructor Details
#initialize(logger, config) ⇒ Security
Returns a new instance of Security.
66 67 68 69 |
# File 'lib/dinstaller/security.rb', line 66 def initialize(logger, config) @config = config @logger = logger end |
Instance Attribute Details
#logger ⇒ Logger (readonly)
64 65 66 |
# File 'lib/dinstaller/security.rb', line 64 def logger @logger end |
Instance Method Details
#probe ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/dinstaller/security.rb', line 75 def probe selected_lsm = config.data["security"]["lsm"] lsm_config.select(selected_lsm) patterns = if selected_lsm.nil? [] else lsm_data = config.data["security"]["available_lsms"][selected_lsm] lsm_data["patterns"] end Yast::PackagesProposal.SetResolvables("LSM", :pattern, patterns) end |
#write ⇒ Object
71 72 73 |
# File 'lib/dinstaller/security.rb', line 71 def write lsm_config.save end |