Debian Codegraph @

libselinux/man/man5/default_contexts.5

raw
1 .TH "default_contexts" "5" "28-Nov-2011" "Security Enhanced Linux" "SELinux configuration"
2 .SH "NAME"
3 default_contexts \- The SELinux default contexts configuration file
4 .
5 .SH "DESCRIPTION"
6 The default contexts configuration file \fIdefault_contexts\fR contains entries that allow SELinux-aware login applications such as
7 .BR PAM "(8) "
8 .sp
9 SELinux-aware login applications generally use one or more of the following libselinux functions that read these files from the active policy path:
10 .RS
11 .BR get_default_context "(3) "
12 .br
13 .BR get_ordered_context_list "(3) "
14 .br
15 .BR get_ordered_context_list_with_level "(3) "
16 .br
17 .BR get_default_context_with_level "(3) "
18 .br
19 .BR get_default_context_with_role "(3) "
20 .br
21 .BR get_default_context_with_rolelevel "(3) "
22 .br
23 .BR query_user_context "(3) "
24 .br
25 .BR manual_user_enter_context "(3) "
26 .RE
27 .sp
28 The default context configuration file path for the active policy is returned by \fBselinux_default_contexts_path\fR(3). The default, default contexts file is:
29 .RS
30 .I /etc/selinux/{SELINUXTYPE}/contexts/default_contexts
31 .RE
32 .sp
33 Where \fI{SELINUXTYPE}\fR is the entry from the selinux configuration file \fIconfig\fR (see \fBselinux_config\fR(5)).
34 .
35 .SH "FILE FORMAT"
36 Each line in the default configuration file consists of the following:
37 .RS
38 .I login_process user_login_process [user_login_process] ...
39 .RE
40 .sp
41 Where:
42 .RS
43 .I login_process
44 .RS
45 This consists of a \fIrole\fB:\fItype\fR[\fB:\fIrange\fR] entry that represents the login process context that are defined in the policy.
46 .RE
47 .I user_login_process
48 .RS
49 This consists of one or more \fIrole\fB:\fItype\fR[\fB:\fIrange\fR] entries that represent the user login process context defined in the policy.
50 .RE
51 .RE
52 .
53 .SH "EXAMPLE"
54 # ./contexts/default_contexts
55 .br
56 system_r:crond_t:s0 system_r:system_crond_t:s0
57 .br
58 system_r:local_login_t:s0 user_r:user_t:s0 staff_r:staff_t:s0
59 .br
60 system_r:remote_login_t:s0 user_r:user_t:s0
61 .br
62 system_r:sshd_t:s0 user_r:user_t:s0
63 .br
64 system_r:sulogin_t:s0 sysadm_r:sysadm_t:s0
65 .br
66 system_r:xdm_t:s0 user_r:user_t:s0
67 .
68 .SH "SEE ALSO"
69 .ad l
70 .nh
71 .BR selinux "(8), " selinux_default_contexts_path "(3), " PAM "(8), " selinux_default_type_path "(3), " get_default_context "(3), " get_ordered_context_list "(3), " get_ordered_context_list_with_level "(3), " get_default_context_with_level "(3), " get_default_context_with_role "(3), " get_default_context_with_rolelevel "(3), " query_user_context "(3), " manual_user_enter_context "(3), " selinux_config "(5) "