security_disable(3)

security_disable3

Disable the selinux kernel code at runtime

Usage

#include <selinux/selinux.h>

int security_disable(void);

Overview

security_disable() disables the SELinux kernel code, unregisters selinuxfs from /proc/filesystems, and then unmounts /sys/fs/selinux.

This function is only supported on Linux 6.3 and earlier, and can only be called at runtime and prior to the initial policy load. After the initial policy load, the SELinux kernel code cannot be disabled, but only placed in "permissive" mode by using security_setenforce(3).

Return value

security_disable() returns zero on success or -1 on error.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 3 times.

  1. 6.0–7
  2. 8
  3. 9–12
  4. 13

Author

This manual page has been written by Guido Trentalancia <[email protected]>

From libselinux1-dev 3.8.1-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.