~ubuntu-branches/ubuntu/trusty/pam/trusty-proposed

« back to all changes in this revision

Viewing changes to modules/pam_selinux/README

  • Committer: Package Import Robot
  • Author(s): Steve Langasek
  • Date: 2014-01-16 02:40:41 UTC
  • mfrom: (3.2.29 sid)
  • Revision ID: package-import@ubuntu.com-20140116024041-icb0n92uw90aoofm
Tags: 1.1.8-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - debian/libpam-modules.postinst: Add PATH to /etc/environment if it's
    not present there or in /etc/security/pam_env.conf. (should send to
    Debian).
  - debian/libpam0g.postinst: only ask questions during update-manager when
    there are non-default services running.
  - debian/libpam0g.postinst: check if gdm is actually running before
    trying to reload it.
  - debian/libpam0g.postinst: the init script for 'samba' is now named
    'smbd' in Ubuntu, so fix the restart handling.
  - Change Vcs-Bzr to point at the Ubuntu branch.
  - debian/patches-applied/series: Ubuntu patches are as below ...
  - debian/patches-applied/ubuntu-rlimit_nice_correction: Explicitly
    initialise RLIMIT_NICE rather than relying on the kernel limits.
  - debian/patches-applied/pam_umask_usergroups_from_login.defs.patch:
    Deprecate pam_unix's explicit "usergroups" option and instead read it
    from /etc/login.def's "USERGROUP_ENAB" option if umask is only defined
    there. This restores compatibility with the pre-PAM behaviour of login.
  - debian/patches-applied/pam_motd-legal-notice: display the contents of
    /etc/legal once, then set a flag in the user's homedir to prevent
    showing it again.
  - debian/update-motd.5, debian/libpam-modules.manpages: add a manpage
    for update-motd, with some best practices and notes of explanation.
  - debian/patches/update-motd-manpage-ref: add a reference in pam_motd(8)
    to update-motd(5)
  - debian/local/common-session{,-noninteractive}: Enable pam_umask by
    default, now that the umask setting is gone from /etc/profile.
  - debian/local/pam-auth-update: Add the new md5sums for pam_umask addition.
  - Build-depend on libfl-dev in addition to flex, for cross-building
    support.
  - Add /usr/local/games to PATH.
  - Adjust debian/patches-applied/update-motd to write to
    /run/motd.dynamic, as sysvinit/ssh/login in Debian have been changed
    to use this file and no longer links /etc/motd to /var/run/motd.
* debian/patches-applied/pam_umask_usergroups_from_login.defs.patch: include
  patch to autogenerated manpage file

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
DESCRIPTION
6
6
 
7
 
In a nutshell, pam_selinux sets up the default security context for the next
8
 
execed shell.
9
 
 
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.
14
 
 
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.
 
7
pam_selinux is a PAM module that sets up the default SELinux security context
 
8
for the next executed process.
 
9
 
 
10
When a new session is started, the open_session part of the module computes and
 
11
sets up the execution security context used for the next execve(2) call, the
 
12
file security context for the controlling terminal, and the security context
 
13
used for creating a new kernel keyring.
 
14
 
 
15
When the session is ended, the close_session part of the module restores old
 
16
security contexts that were in effect before the change made by the
 
17
open_session part of the module.
 
18
 
 
19
Adding pam_selinux into the PAM stack might disrupt behavior of other PAM
 
20
modules which execute applications. To avoid that, pam_selinux.so open should
 
21
be placed after such modules in the PAM stack, and pam_selinux.so close should
 
22
be placed before them. When such a placement is not feasible, pam_selinux.so
 
23
restore could be used to temporary restore original security contexts.
23
24
 
24
25
OPTIONS
25
26
 
 
27
open
 
28
 
 
29
    Only execute the open_session part of the module.
 
30
 
26
31
close
27
32
 
28
 
    Only execute the close_session portion of the module.
 
33
    Only execute the close_session part of the module.
 
34
 
 
35
restore
 
36
 
 
37
    In open_session part of the module, temporarily restore the security
 
38
    contexts as they were before the previous call of the module. Another call
 
39
    of this module without the restore option will set up the new security
 
40
    contexts again.
 
41
 
 
42
nottys
 
43
 
 
44
    Do not setup security context of the controlling terminal.
29
45
 
30
46
debug
31
47
 
32
 
    Turns on debugging via syslog(3).
33
 
 
34
 
open
35
 
 
36
 
    Only execute the open_session portion of the module.
37
 
 
38
 
nottys
39
 
 
40
 
    Do not try to setup the ttys security context.
 
48
    Turn on debug messages via syslog(3).
41
49
 
42
50
verbose
43
51
 
44
 
    attempt to inform the user when security context is set.
 
52
    Attempt to inform the user when security context is set.
45
53
 
46
54
select_context
47
55
 
48
 
    Attempt to ask the user for a custom security context role. If MLS is on
 
56
    Attempt to ask the user for a custom security context role. If MLS is on,
49
57
    ask also for sensitivity level.
50
58
 
51
59
env_params
52
60
 
53
61
    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
 
62
    MLS is on, obtain also sensitivity level. This option and the
 
63
    select_context option are mutually exclusive. The respective PAM
 
64
    environment variables are SELINUX_ROLE_REQUESTED, SELINUX_LEVEL_REQUESTED,
 
65
    and SELINUX_USE_CURRENT_RANGE. The first two variables are self describing
 
66
    and the last one if set to 1 makes the PAM module behave as if the
59
67
    use_current_range was specified on the command line of the module.
60
68
 
61
69
use_current_range