selinux_getpolicytype(3)
β¨ selinux_getpolicytype(3) β¨
okay bestie, so this one lives in the SELinux API documentation and it's genuinely so useful, no cap π
π NAME π
selinux_getpolicytype β get the type of SELinux policy running on the system
πΈ SYNOPSIS πΈ
#include <selinux/selinux.h>
int selinux_getpolicytype(char **policytype);
π¦ DESCRIPTION π¦
selinux_getpolicytype() reads the contents of the /etc/selinux/config file to figure out which SELinux policy is being used on the system, and then sets policytype accordingly. like, it literally goes and peeks at the config file for you, slay π
when you're done with it, free policytype with free(3). don't ghost it, bestie, free your memory π«Ά
π RETURN VALUE π
on success, zero is returned. on failure, -1 is returned. that's it, that's the vibe check π
π SEE ALSO π
and that's the whole page, periodt π this icon was written by dwalsh@redhat.com back on 24 Sep 2008, and it's part of the selinux_getpolicytype(3) manual page β go off, king πβ¨
π¦ 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