security_disable(3)
β¨ NAME β¨
security_disable β bestie, this one turns off the SELinux kernel code at runtime π
π SYNOPSIS π
#include <selinux/selinux.h>
int security_disable(void);
π DESCRIPTION π
okay so here's the tea π β security_disable() does three things in one glorious swoop:
- it disables the SELinux kernel code
- it unregisters
selinuxfsfrom/proc/filesystems - and then it unmounts
/sys/fs/selinux
like, it's giving full shutdown energy fr fr π
β οΈ now listen, this is the important part. This function is only supported on Linux 6.3 and earlier, and it can only be called at runtime and prior to the initial policy load. Periodt.
After the initial policy load? Nope. The SELinux kernel code cannot be disabled at that point β it can only be placed in "permissive" mode by using security_setenforce(3). That's the only move left, bestie π
πΈ RETURN VALUE πΈ
security_disable() returns zero on success or -1 on error. Simple as that π«Ά
π¦ AUTHOR π¦
This manual page has been written by Guido Trentalancia <guido@trentalancia.com> β ty for your service king π
β SEE ALSO β
selinux(8)setenforce (8)
and that's the whole vibe check, bestie π this lil page is part of the SELinux API documentation, and it's dated 21 Nov 2009 β yes she's an icon, yes she's been iconic for a minute, no cap. mwah, go be safe out there πβ¨
π¦ 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
- 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 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