README: update outdated docs

This commit is contained in:
0x1eef 2024-03-20 17:51:02 -03:00
parent a34066c47b
commit c064af26a6

View file

@ -3,8 +3,8 @@
bsdcontrol.rb provides Ruby bindings for libhbsdcontrol from the bsdcontrol.rb provides Ruby bindings for libhbsdcontrol from the
[hardenedbsd](https://hardenedbsd.org) project. Through [hardenedbsd](https://hardenedbsd.org) project. Through
this library, you can query what features are available and if this library, you can query what features are available and if
root: enable, disable or query the status of a feature for a root: enable or disable a feature for a given file, or restore
given file. the system default for a given file.
## Examples ## Examples
@ -27,7 +27,9 @@ end
__Enable__ __Enable__
As a superuser, 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: The example enables the mprotect feature for the emacs binary. When
a feature is enabled for a given file, that setting takes precendence
over the system default (sysctl):
``` ruby ``` ruby
#!/usr/bin/env ruby #!/usr/bin/env ruby
@ -41,10 +43,9 @@ BSD::Control
__Status__ __Status__
As a superuser, you can query the status of a feature for a given file. 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`, There are five recognized statuses: `unknown`, `enabled`, `disabled`,
`enabled`, and `disabled`. The first status (conflict) is rare and indicates that a `sysdef`, and `invalid`. The `sysdef` status indicates that a feature takes
feature is both enabled and disabled. The other three are more common. The `sysdef` its settings from the system default (sysctl), and is the most common status:
status indicates that a feature takes its settings from the system default (sysctl):
``` ruby ``` ruby
#!/usr/bin/env ruby #!/usr/bin/env ruby