semanage_bool(3)

πŸ“¦
version 3.11 Β· 2 versions
, in centos-stream 10, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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 key
  • semanage_bool_key_extract(3) β€” create a key matching this boolean
  • semanage_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 key
  • semanage_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 boolean
  • semanage_bool_set_name(3) β€” set the name of this boolean
  • semanage_bool_get_value(3) β€” return the value of this boolean
  • semanage_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 πŸ’…


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 πŸ’…βœ¨πŸ¦‹