is_context_customizable(3)
β¨ is_context_customizable β¨
okay bestie, welcome to the SELinux API docs, and today's main character is is_context_customizable(3) β she's a lil function that checks whether a SELinux context type is customizable by the administrator π
πΈ NAME πΈ
is_context_customizable β check whether SELinux context type is customizable by the administrator
π¦ SYNOPSIS π¦
#include <selinux/selinux.h>
int is_context_customizable(const char *scon);
π DESCRIPTION π
so basically, this function checks whether the type of scon lives inside the /etc/selinux/{SELINUXTYPE}/context/customizable_types file. that's it, that's the whole vibe check π
and like, what even is a customizable type? a customizable type is a file context type that administrators set on files β usually so that certain domains can share the file content π«Ά lowkey iconic behaviour.
also important: restorecon and setfiles, by default, leave these context in place. so if you were wondering why your custom label didn't get nuked, it's giving by design, bestie π
π RETURN VALUE π
- returns
1if security context is customizable β¨ - returns
0if it is not π - returns
-1on error π
π FILE π
/etc/selinux/{SELINUXTYPE}/context/customizable_types
π SEE ALSO π
ngl, if you're messing with SELinux contexts, go read selinux(8) too β she's the mother of the whole situation π
and that's the page fr fr πΈ written by dwalsh@redhat.com, dated 10 January 2005, and it's part of the SELinux API documentation β mwah, slay, periodt π
π
π¦ 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