default_contexts(5)

default_contexts5

The selinux default contexts configuration file

Overview

The default contexts configuration file default_contexts contains entries that allow SELinux-aware login applications such as PAM(8)

SELinux-aware login applications generally use one or more of the following libselinux functions that read these files from the active policy path:

The default context configuration file path for the active policy is returned by selinux_default_contexts_path(3). The default, default contexts file is:

/etc/selinux/{SELINUXTYPE}/contexts/default_contexts

Where {SELINUXTYPE} is the entry from the selinux configuration file config (see selinux_config(5)).

File format

Each line in the default configuration file consists of the following:

login_process user_login_process [user_login_process] ...

Where:

login_process

This consists of a role:type[:range] entry that represents the login process context that are defined in the policy.

user_login_process

This consists of one or more role:type[:range] entries that represent the user login process context defined in the policy.

Examples

# ./contexts/default_contexts
system_r:crond_t:s0 system_r:system_crond_t:s0
system_r:local_login_t:s0 user_r:user_t:s0 staff_r:staff_t:s0
system_r:remote_login_t:s0 user_r:user_t:s0
system_r:sshd_t:s0 user_r:user_t:s0
system_r:sulogin_t:s0 sysadm_r:sysadm_t:s0
system_r:xdm_t:s0 user_r:user_t:s0

Releases

7 releases since Debian 7 (Wheezy); the text changed 1 time.

  1. 7
  2. 8–13

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