selinux_bi...olicy_path(3)
π selinux_bi...olicy_path β the SELinux API Documentation girlies π
okay bestie, welcome to the selinux_bi...olicy_path(3) page, part of the SELinux API Documentation β¨ yes the title is literally cut off in the middle, that's just how it is, we don't ask questions π
πΈ NAME πΈ
selinux_path, selinux_policy_root, selinux_binary_policy_path, selinux_current_policy_path, selinux_failsafe_context_path, selinux_removable_context_path, selinux_default_context_path, selinux_user_contexts_path, selinux_file_context_path, selinux_media_context_path, selinux_contexts_path β these functions return the paths to the active SELinux policy configuration directories and files π«Ά
like. that's the whole job. path-finders. little tour guides for your SELinux config π
β¨ SYNOPSIS β¨
#include <selinux/selinux.h>
const char *selinux_path(void);
const char *selinux_policy_root(void);
const char *selinux_binary_policy_path(void);
const char *selinux_current_policy_path(void);
const char *selinux_failsafe_context_path(void);
const char *selinux_removable_context_path(void);
const char *selinux_default_context_path(void);
const char *selinux_user_contexts_path(void);
const char *selinux_usersconf_path(void);
const char *selinux_x_context_path(void);
const char *selinux_sepgsql_context_path(void);
const char *selinux_file_context_path(void);
const char *selinux_media_context_path(void);
const char *selinux_securetty_types_path(void);
const char *selinux_contexts_path(void);
π¦ DESCRIPTION π¦
so basically, these functions return the paths to the active policy configuration directories and files, and they figure all that out based on the settings in /etc/selinux/config π that file is the source of truth, bestie. no cap.
selinux_path()β returns the top-level SELinux configuration directory πselinux_policy_root()β returns the top-level policy directory πΈselinux_binary_policy_path()β returns the binary policy file loaded into kernel π₯selinux_current_policy_path()β returns the currently loaded policy file from the kernel πselinux_default_type_path()β returns the context file mapping roles to default types πselinux_failsafe_context_path()β returns the failsafe context for emergency logins π¨ (emergency!! like, the backup plan energy)selinux_removable_context_path()β returns the filesystem context for removable media πΎselinux_default_context_path()β returns the system-wide default contexts for user sessions πselinux_user_contexts_path()β returns the directory containing per-user default contexts π«Άselinux_usersconf_path()β returns the file containing mapping between Linux Users and SELinux users π§selinux_x_context_path()β returns the file containing configuration for XSELinux extension π₯οΈselinux_sepgsql_context_path()β returns the file containing configuration for SE-PostgreSQL πselinux_netfilter_context_path()β returns the default netfilter context π₯selinux_file_context_path()β returns the default system file contexts configuration πselinux_file_context_local_path()β returns the local customization file contexts configuration β¨selinux_file_context_homedir_path()β returns the home directory file contexts configuration πselinux_media_context_path()β returns the file contexts for media device nodes πselinux_contexts_path()β returns the directory containing all of the context configuration files πselinux_securetty_types_path()β returns the defines tty types fornewrolesecurettys π
lowkey obsessed with how every single one of these is just "here is a path, bestie, go wild." main character energy fr fr π
π AUTHOR π
this manual page was written by Dan Walsh <dwalsh@redhat.com> π«Ά absolute icon, we stan π
β SEE ALSO β
selinux(8)β go read that one next, iykyk π
and that's the page!! thanks for reading my little path-tour, bestie πΈ this was the selinux_bi...olicy_path(3) page, written by <dwalsh@redhat.com>, dated 15 November 2004 β¨ slay, 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