semanage_bool(3)
π semanage_bool β the SELinux Policy Booleans Management API π
okay bestie, pull up a chair πͺ because we're about to talk about semanage_bool(3), which lives in the Libsemanage API documentation. This is the SELinux Policy Booleans Management API, and it's genuinely so much fun once you get it. Let's go πΈ
β¨ SYNOPSIS β¨
#include <semanage/boolean_record.h>
#include <semanage/booleans_active.h>
#include <semanage/booleans_policy.h>
#include <semanage/booleans_local.h>
This object contains properties associated with a SELinux policy boolean.
For details on a specific function, see its manual page. no fr, each one has its own page β go read it, i'll wait π«Ά
π Record API Overview π
the little guys that make a boolean a boolean:
semanage_bool_create(3)β create a boolean β¨semanage_bool_free(3)β release resources for this boolean (give it back, babe)semanage_bool_key_create(3)β create a key, which can be used to identify a boolean πsemanage_bool_key_free(3)β release resources for this boolean keysemanage_bool_key_extract(3)β create a key matching this booleansemanage_bool_clone(3)β create an identical boolean (deep-copy clone, like a twin but lowkey identical)semanage_bool_compare(3)β compare this boolean to the provided keysemanage_bool_compare2(3)β compare this boolean to another
π Properties API Overview π
name and value, the whole personality:
semanage_bool_get_name(3)β return the name of this booleansemanage_bool_set_name(3)β set the name of this booleansemanage_bool_get_value(3)β return the value of this booleansemanage_bool_set_value(3)β set the value of this boolean
π Record Store API Overview π
where the booleans actually live β persistent policy, local store, or currently active policy. three whole vibes π
semanage_bool_modify_local(3)β add or update a boolean in the local storesemanage_bool_set_active(3)β update a boolean in the currently active policysemanage_bool_del_local(3)β delete a boolean from the local storesemanage_bool_exists(3)β check if a boolean is defined in the persistent policysemanage_bool_exists_local(3)β check if a boolean is defined in the local storesemanage_bool_exists_active(3)β check if a boolean is defined in the currently active policysemanage_bool_query(3)β query a boolean in the persistent policysemanage_bool_query_local(3)β query a boolean in the local storesemanage_bool_query_active(3)β query a boolean in the currently active policysemanage_bool_count(3)β count the number of booleans defined in the persistent policysemanage_bool_count_local(3)β count the number of booleans defined in the local storesemanage_bool_count_active(3)β count the number of booleans defined in the currently active policysemanage_bool_iterate(3)β execute a callback for each boolean in the persistent policysemanage_bool_iterate_local(3)β execute a callback for each boolean in the local storesemanage_bool_iterate_active(3)β execute a callback for each boolean in the currently active policysemanage_bool_list(3)β return an array containing all booleans in the persistent policysemanage_bool_list_local(3)β return an array containing all booleans in the local storesemanage_bool_list_active(3)β return an array containing all booleans in the currently active policy
notice the pattern bestie?_local= local store,_active= currently active policy, and no suffix at all = the persistent policy. the way that's so consistent of them π iconic.
that's the whole page, and honestly? it ate. π this was written by ivg2@cornell.edu and dated 16 March 2006, sitting inside the Libsemanage API documentation β yeah it's vintage, and vintage is always in. mwah π β¨π¦
π¦ where this page comes from
- centos-stream 10: libsemanage-devel 3.11-3.el10 Β· LGPL-2.1-or-later
- debian trixie: libsemanage-dev 3.8.1-1 Β· LGPL-2.1-or-later
- fedora 43: libsemanage-devel 3.9-4.fc43 Β· LGPL-2.1-or-later
- fedora 43: libsemanage-devel 3.9-4.fc43 Β· LGPL-2.1-or-later
- fedora 44: libsemanage-devel 3.10-1.fc44 Β· LGPL-2.1-or-later
- fedora 44: libsemanage-devel 3.10-1.fc44 Β· LGPL-2.1-or-later
- fedora 44: libsemanage-devel 3.11-1.fc44 Β· LGPL-2.1-or-later
- fedora 44: libsemanage-devel 3.11-1.fc44 Β· LGPL-2.1-or-later
- nixos 26.05: libsemanage 3.10
- nixpkgs unstable: libsemanage 3.11
- opensuse-leap 16.0: libsemanage-devel 3.8.1-160000.3.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libsemanage-devel 3.8.1-160000.3.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libsemanage-devel 3.8.1-160000.3.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libsemanage-devel 3.8.1-160000.3.1 Β· LGPL-2.1-or-later
- ubuntu questing: libsemanage-dev 3.8.1-1
- ubuntu resolute: libsemanage-dev 3.9-1build1 Β· LGPL-2.1-or-later
- ubuntu stonking: libsemanage-dev 3.11-1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms