selinux_boolean_sub(3)
π selinux_boolean_sub β it's in the SELinux API documentation, bestie π
okay so real talk: selinux_boolean_sub is a lil function that hunts down the translated name for a boolean_name record. that's it. that's the whole job. she's a lookup girlie and she's iconic for it β¨
πΈ SYNOPSIS πΈ
#include <selinux/selinux.h>
char *selinux_boolean_sub(const char *boolean_name);
π¦ DESCRIPTION π¦
so selinux_boolean_sub() goes digging through the file at /etc/selinux/{POLICYTYPE}/booleans.subs_dist, looking for a boolean_name record that matches yours. lowkey a whole scavenger hunt π
if that record exists, she hands you back the boolean substitution name. periodt.
if it does not exist? no stress, no drama β selinux_boolean_sub() just returns your original boolean_name to you, unchanged. she's not gonna leave you hanging π«Ά
β¨ RETURN VALUE β¨
on success, selinux_boolean_sub() returns either the boolean_name or the substituted name. either way you're eating good π
β οΈ important bestie: the returned value must be freed with free(3). don't forget, or that's a leak and we don't do leaks in this house π
and if something goes wrong? selinux_boolean_sub() returns NULL on error. not great, not terrible, just NULL π
π SEE ALSO π
mwah π that's the whole page. written by dwalsh@redhat.com, dated 11 June 2012, and it lives in selinux_boolean_sub(3). slay, go free your memory, ily bye πβ¨
π¦ where this page comes from
- alpine 3.24: libselinux-doc 3.10-r1 Β· Public-Domain
- centos-stream 10: libselinux-devel 3.11-3.el10 Β· LicenseRef-Fedora-Public-Domain
- centos-stream 9: libselinux-devel 3.6-5.el9 Β· Public Domain
- centos-stream 9: libselinux-devel 3.6-5.el9 Β· Public Domain
- debian bookworm: libselinux1-dev 3.4-1+b6
- debian trixie: libselinux1-dev 3.8.1-1 Β· LicenseRef-public-domain
- fedora 43: libselinux-devel 3.9-5.fc43 Β· LicenseRef-Fedora-Public-Domain
- fedora 43: libselinux-devel 3.9-5.fc43 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-devel 3.10-1.fc44 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-devel 3.10-1.fc44 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-devel 3.11-2.fc44 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-devel 3.11-2.fc44 Β· LicenseRef-Fedora-Public-Domain
- nixos 26.05: libselinux 3.10
- nixpkgs unstable: libselinux 3.11
- opensuse-leap 16.0: libselinux-devel 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: libselinux-devel 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: libselinux-devel 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: libselinux-devel 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- ubuntu jammy: libselinux1-dev 3.3-1build2
- ubuntu noble: libselinux1-dev 3.5-2ubuntu2 Β· LicenseRef-public-domain
- ubuntu noble: libselinux1-dev 3.5-2ubuntu2.1 Β· LicenseRef-public-domain
- ubuntu questing: libselinux1-dev 3.8.1-1build1
- ubuntu resolute: libselinux-dev 3.9-4build1 Β· LicenseRef-public-domain
- ubuntu stonking: libselinux-dev 3.11-2.1 Β· LicenseRef-public-domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms