blob: 3acd1322f7938fd847b2abc90cf1f8193572955f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
<?xml version="1.0" encoding='UTF-8'?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
<refentry id="pam_selinux">
<refmeta>
<refentrytitle>pam_selinux</refentrytitle>
<manvolnum>8</manvolnum>
<refmiscinfo class="sectdesc">Linux-PAM Manual</refmiscinfo>
</refmeta>
<refnamediv id="pam_selinux-name">
<refname>pam_selinux</refname>
<refpurpose>PAM module to set the default security context</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis id="pam_selinux-cmdsynopsis">
<command>pam_selinux.so</command>
<arg choice="opt">
close
</arg>
<arg choice="opt">
debug
</arg>
<arg choice="opt">
open
</arg>
<arg choice="opt">
nottys
</arg>
<arg choice="opt">
verbose
</arg>
<arg choice="opt">
select_context
</arg>
<arg choice="opt">
use_current_range
</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1 id="pam_selinux-description">
<title>DESCRIPTION</title>
<para>
In a nutshell, pam_selinux sets up the default security context for the
next execed shell.
</para>
<para>
When an application opens a session using pam_selinux, the shell that
gets executed will be run in the default security context, or if the
user chooses and the pam file allows the selected security context.
Also the controlling tty will have it's security context modified to
match the users.
</para>
<para>
Adding pam_selinux into a pam file could cause other pam modules to
change their behavior if the exec another application. The close and
open option help mitigate this problem. close option will only cause
the close portion of the pam_selinux to execute, and open will only
cause the open portion to run. You can add pam_selinux to the config
file twice. Add the pam_selinux close as the executes the open pass
through the modules, pam_selinux open_session will happen last.
When PAM executes the close pass through the modules pam_selinux
close_session will happen first.
</para>
</refsect1>
<refsect1 id="pam_selinux-options">
<title>OPTIONS</title>
<variablelist>
<varlistentry>
<term>
<option>close</option>
</term>
<listitem>
<para>
Only execute the close_session portion of the module.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>debug</option>
</term>
<listitem>
<para>
Turns on debugging via
<citerefentry>
<refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>open</option>
</term>
<listitem>
<para>
Only execute the open_session portion of the module.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>nottys</option>
</term>
<listitem>
<para>
Do not try to setup the ttys security context.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>verbose</option>
</term>
<listitem>
<para>
attempt to inform the user when security context is set.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>select_context</option>
</term>
<listitem>
<para>
Attempt to ask the user for a custom security context role.
If MLS is on ask also for sensitivity level.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>use_current_range</option>
</term>
<listitem>
<para>
Use the sensitivity range of the process for the user context.
This option and the select_context option are mutually exclusive.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="pam_selinux-services">
<title>MODULE SERVICES PROVIDED</title>
<para>
Only the <option>session</option> service is supported.
</para>
</refsect1>
<refsect1 id='pam_selinux-return_values'>
<title>RETURN VALUES</title>
<variablelist>
<varlistentry>
<term>PAM_AUTH_ERR</term>
<listitem>
<para>
Unable to get or set a valid context.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>PAM_SUCCESS</term>
<listitem>
<para>
The security context was set successfull.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>PAM_USER_UNKNOWN</term>
<listitem>
<para>
The user is not known to the system.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id='pam_selinux-examples'>
<title>EXAMPLES</title>
<programlisting>
auth required pam_unix.so
session required pam_permit.so
session optional pam_selinux.so
</programlisting>
</refsect1>
<refsect1 id='pam_selinux-see_also'>
<title>SEE ALSO</title>
<para>
<citerefentry>
<refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>pam.d</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>
</para>
</refsect1>
<refsect1 id='pam_selinux-author'>
<title>AUTHOR</title>
<para>
pam_selinux was written by Dan Walsh <dwalsh@redhat.com>.
</para>
</refsect1>
</refentry>
|