Skip to content

Commit

Permalink
Add some examples in the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dgdavid committed Feb 3, 2021
1 parent 04d4b83 commit dc71ad4
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/lib/security/selinux_config.rb
Expand Up @@ -22,6 +22,34 @@

module Security
# Class for handling SELinux kernel params
#
# @example Querying the currently configured SELinux mode
# selinux = SelinuxConfig.new
# mode = selinux.mode
# puts mode.id #=> :permissive
# puts mode.name #=> "Permisive"
#
# @example Querying the currently running SELinux mode
# selinux= SelinuxConfig.new
# mode = selinux.running_mode
# puts mode.id #=> :enforcing
# puts mode.name #=> "Enforcing"
#
# @example Enabling SELinux in Permissive mode for next boot
# selinux = SelinuxConfig.new
# selinux.mode = :permissive
# selinux.save #=> true
#
# @example Disabling SELinux for next boot
# selinux = SelinuxConfig.new
# selinux.mode = :disabled
# selinux.save #=> true
#
# @example Disabling SELinux for next boot (using nil)
# selinux = SelinuxConfig.new
# selinux.mode = nil
# selinux.mode.id #=> :disabled
# selinux.save #=> true
class SelinuxConfig
extend Yast::I18n
include Yast::I18n
Expand Down

0 comments on commit dc71ad4

Please sign in to comment.