1 .\" Copyright (C) 2014 Red Hat, Inc. All Rights Reserved.
2 .\" Written by David Howells (dhowells@redhat.com)
4 .\" SPDX-License-Identifier: GPL-2.0-or-later
6 .TH SESSION-KEYRING 7 2021-03-22 "Linux man-pages (unreleased)"
8 session-keyring \- session shared process keyring
10 The session keyring is a keyring used to anchor keys on behalf of a process.
11 It is typically created by
13 when a user logs in and a link will be added that refers to the
14 .BR user\-keyring (7).
15 Optionally, PAM may revoke the session keyring on logout.
16 (In typical configurations, PAM does do this revocation.)
17 The session keyring has the name (description)
20 A special serial number value,
21 .BR KEY_SPEC_SESSION_KEYRING ,
22 is defined that can be used in lieu of the actual serial number of
23 the calling process's session keyring.
27 utility, '\fB@s\fP' can be used instead of a numeric key ID in
30 A process's session keyring is inherited across
38 even when the executable is set-user-ID or set-group-ID or has capabilities.
39 The session keyring is destroyed when the last process that
42 If a process doesn't have a session keyring when it is accessed, then,
43 under certain circumstances, the
44 .BR user\-session\-keyring (7)
45 will be attached as the session keyring
46 and under others a new session keyring will be created.
48 .BR user\-session\-keyring (7)
50 .SS Special operations
53 library provides the following special operations for manipulating
56 .BR keyctl_join_session_keyring (3)
57 This operation allows the caller to change the session keyring
58 that it subscribes to.
59 The caller can join an existing keyring with a specified name (description),
60 create a new keyring with a given name,
61 or ask the kernel to create a new "anonymous"
62 session keyring with the name "_ses".
63 (This function is an interface to the
65 .B KEYCTL_JOIN_SESSION_KEYRING
68 .BR keyctl_session_to_parent (3)
69 This operation allows the caller to make the parent process's
70 session keyring to the same as its own.
71 For this to succeed, the parent process must have
72 identical security attributes and must be single threaded.
73 (This function is an interface to the
75 .B KEYCTL_SESSION_TO_PARENT
78 These operations are also exposed through the
85 keyctl session \- [<prog> <arg1> <arg2> ...]
86 keyctl session <name> [<prog> <arg1> <arg2> ...]
102 .BR keyctl_join_session_keyring (3),
103 .BR keyctl_session_to_parent (3),
105 .BR persistent\-keyring (7),
106 .BR process\-keyring (7),
107 .BR thread\-keyring (7),
108 .BR user\-keyring (7),
109 .BR user\-session\-keyring (7),