From 93e04cb8b3ff02ace3050c560d249c263eafadbe Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Thu, 14 Mar 2024 16:15:50 -0300 Subject: [PATCH] README:update --- README.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 488201a..48f8019 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ## About -hbsdctl.rb is a C extension that binds libhbsdcontrol from the -[hardenedbsd](https://hardenedbsd.org) project to Ruby. Through +hbsdctl.rb provides Ruby bindings for libhbsdcontrol from the +[hardenedbsd](https://hardenedbsd.org) project. Through this library, you can query what features are available and if root: enable, disable or query the status of a feature for a given file. @@ -10,11 +10,12 @@ given file. __Features__ -As a regular user account, you can obtain a list of available features: +As an unprivileged user or as a superuser, you can obtain a list of +available features: ``` ruby #!/usr/bin/env ruby -# As a regular user account +# Required privileges: unprivileged user or superuser. require "hbsdctl" BSD::Control .available_features @@ -25,12 +26,12 @@ end __Enable__ -As a superuser account, you can enable or disable a feature for a given file. +As a superuser, you can enable or disable a feature for a given file. The example enables the mprotect feature for the emacs binary: ``` ruby #!/usr/bin/env ruby -# As a superuser account +# Required privileges: superuser. require "hbsdctl" BSD::Control .feature(:mprotect) @@ -39,15 +40,15 @@ BSD::Control __Status__ -As a superuser account, you can query whether or not a feature is enabled or disabled -for a given file. There are four statuses that can be returned: `conflict`, `sysdef`, +As a superuser, you can query the status of a feature for a given file. +There are four statuses that can be returned: `conflict`, `sysdef`, `enabled`, and `disabled`. The first status (conflict) is rare and indicates that a feature is both enabled and disabled. The other three are more common. The `sysdef` status indicates that a feature takes its settings from the system default (sysctl): ``` ruby #!/usr/bin/env ruby -# As a superuser account +# Required privileges: superuser. require "hbsdctl" BSD::Control .feature(:mprotect) @@ -63,7 +64,7 @@ A complete API reference is available at **Rubygems.org** -hbsdctl.rb can also be installed via rubygems.org. +hbsdctl.rb can be installed via rubygems.org. gem install hbsdctl.rb