---
name: "selinux_binary_policy_path"
section: "3"
platform: "linux"
package: "libselinux1-dev"
version: "3.8.1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/selinux_binary_policy_path"
---

# selinux\_binary\_policy\_path(3)

These functions return the paths to the active SELinux policy configuration directories and files

## 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

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

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

This manual page was written by Dan Walsh \<dwalsh@redhat.com\>.

## SEE ALSO

[**selinux**(8)](/selinux/8.md)
