1PAM_KEYINIT(8)                 Linux-PAM Manual                 PAM_KEYINIT(8)
2
3
4

NAME

6       pam_keyinit - Kernel session keyring initialiser module
7

SYNOPSIS

9       pam_keyinit.so [debug] [force] [revoke]
10

DESCRIPTION

12       The pam_keyinit PAM module ensures that the invoking process has a
13       session keyring other than the user default session keyring.
14
15       The session component of the module checks to see if the process's
16       session keyring is the user default, and, if it is, creates a new
17       anonymous session keyring with which to replace it.
18
19       If a new session keyring is created, it will install a link to the user
20       common keyring in the session keyring so that keys common to the user
21       will be automatically accessible through it.
22
23       The session keyring of the invoking process will thenceforth be
24       inherited by all its children unless they override it.
25
26       This module is intended primarily for use by login processes. Be aware
27       that after the session keyring has been replaced, the old session
28       keyring and the keys it contains will no longer be accessible.
29
30       This module should not, generally, be invoked by programs like su,
31       since it is usually desirable for the key set to percolate through to
32       the alternate context. The keys have their own permissions system to
33       manage this.
34
35       This module should be included as early as possible in a PAM
36       configuration, so that other PAM modules can attach tokens to the
37       keyring.
38
39       The keyutils package is used to manipulate keys more directly. This can
40       be obtained from:
41
42       Keyutils[1]
43

OPTIONS

45       debug
46           Log debug information with syslog(3).
47
48       force
49           Causes the session keyring of the invoking process to be replaced
50           unconditionally.
51
52       revoke
53           Causes the session keyring of the invoking process to be revoked
54           when the invoking process exits if the session keyring was created
55           for this process in the first place.
56

MODULE TYPES PROVIDED

58       Only the session module type is provided.
59

RETURN VALUES

61       PAM_SUCCESS
62           This module will usually return this value
63
64       PAM_AUTH_ERR
65           Authentication failure.
66
67       PAM_BUF_ERR
68           Memory buffer error.
69
70       PAM_IGNORE
71           The return value should be ignored by PAM dispatch.
72
73       PAM_SERVICE_ERR
74           Cannot determine the user name.
75
76       PAM_SESSION_ERR
77           This module will return this value if its arguments are invalid or
78           if a system error such as ENOMEM occurs.
79
80       PAM_USER_UNKNOWN
81           User not known.
82

EXAMPLES

84       Add this line to your login entries to start each login session with
85       its own session keyring:
86
87           session  required  pam_keyinit.so
88
89
90       This will prevent keys from one session leaking into another session
91       for the same user.
92

SEE ALSO

94       pam.conf(5), pam.d(5), pam(8)keyctl(1)
95

AUTHOR

97       pam_keyinit was written by David Howells, <dhowells@redhat.com>.
98

NOTES

100        1. Keyutils
101           http://people.redhat.com/~dhowells/keyutils/
102
103
104
105Linux-PAM Manual                  05/18/2017                    PAM_KEYINIT(8)
Impressum