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

OPTIONS

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

MODULE TYPES PROVIDED

57       Only the session module type is provided.
58

RETURN VALUES

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

EXAMPLES

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

SEE ALSO

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

AUTHOR

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

NOTES

99        1. Keyutils
100           http://people.redhat.com/~dhowells/keyutils/
101
102
103
104Linux-PAM Manual                  09/03/2021                    PAM_KEYINIT(8)
Impressum