selinux\_binary\_policy\_path(3) SELinux API Documentation selinux\_binary\_policy\_path(3)

# [NAME](#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

# [SYNOPSIS](#SYNOPSIS)

**#include &lt;selinux/selinux.h&gt;**

**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](#DESCRIPTION)

These functions return the paths to the active policy configuration directories and files based on the settings in */etc/selinux/config*.

**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.

**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 for newrole securettys.

# [AUTHOR](#AUTHOR)

This manual page was written by Dan Walsh &lt;dwalsh@redhat.com&gt;.

# [SEE ALSO](#SEE_ALSO)

[**selinux**(8)](/man/os/libselinux/selinux.8)

15 November 2004 dwalsh@redhat.com

---

Document: selinux_failsafe_context_path(3) from libselinux 3.11-r2 (Chainguard OS)
Source: https://github.com/SELinuxProject/selinux.git
