1 pam_selinux — PAM module to set the default security context
3 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
7 In a nutshell, pam_selinux sets up the default security context for the next
10 When an application opens a session using pam_selinux, the shell that gets
11 executed will be run in the default security context, or if the user chooses
12 and the pam file allows the selected security context. Also the controlling tty
13 will have it's security context modified to match the users.
15 Adding pam_selinux into a pam file could cause other pam modules to change
16 their behavior if the exec another application. The close and open option help
17 mitigate this problem. close option will only cause the close portion of the
18 pam_selinux to execute, and open will only cause the open portion to run. You
19 can add pam_selinux to the config file twice. Add the pam_selinux close as the
20 executes the open pass through the modules, pam_selinux open_session will
21 happen last. When PAM executes the close pass through the modules pam_selinux
22 close_session will happen first.
28 Only execute the close_session portion of the module.
32 Turns on debugging via syslog(3).
36 Only execute the open_session portion of the module.
40 Do not try to setup the ttys security context.
44 attempt to inform the user when security context is set.
48 Attempt to ask the user for a custom security context role. If MLS is on
49 ask also for sensitivity level.
53 Attempt to obtain a custom security context role from PAM environment. If
54 MLS is on obtain also sensitivity level. This option and the select_context
55 option are mutually exclusive. The respective PAM environment variables are
56 SELINUX_ROLE_REQUESTED, SELINUX_LEVEL_REQUESTED, and
57 SELINUX_USE_CURRENT_RANGE. The first two variables are self describing and
58 the last one if set to 1 makes the PAM module behave as if the
59 use_current_range was specified on the command line of the module.
63 Use the sensitivity level of the current process for the user context
64 instead of the default level. Also suppresses asking of the sensitivity
65 level from the user or obtaining it from PAM environment.
69 auth required pam_unix.so
70 session required pam_permit.so
71 session optional pam_selinux.so
76 pam_selinux was written by Dan Walsh <dwalsh@redhat.com>.