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 (date) "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).
17 may revoke the session keyring on logout.
18 (In typical configurations, PAM does do this revocation.)
19 The session keyring has the name (description)
22 A special serial number value,
23 .BR KEY_SPEC_SESSION_KEYRING ,
24 is defined that can be used in lieu of the actual serial number of
25 the calling process's session keyring.
29 utility, '\fB@s\fP' can be used instead of a numeric key ID in
32 A process's session keyring is inherited across
40 even when the executable is set-user-ID or set-group-ID or has capabilities.
41 The session keyring is destroyed when the last process that
44 If a process doesn't have a session keyring when it is accessed, then,
45 under certain circumstances, the
46 .BR user\-session\-keyring (7)
47 will be attached as the session keyring
48 and under others a new session keyring will be created.
50 .BR user\-session\-keyring (7)
52 .SS Special operations
55 library provides the following special operations for manipulating
58 .BR keyctl_join_session_keyring (3)
59 This operation allows the caller to change the session keyring
60 that it subscribes to.
61 The caller can join an existing keyring with a specified name (description),
62 create a new keyring with a given name,
63 or ask the kernel to create a new "anonymous"
64 session keyring with the name "_ses".
65 (This function is an interface to the
67 .B KEYCTL_JOIN_SESSION_KEYRING
70 .BR keyctl_session_to_parent (3)
71 This operation allows the caller to make the parent process's
72 session keyring to the same as its own.
73 For this to succeed, the parent process must have
74 identical security attributes and must be single threaded.
75 (This function is an interface to the
77 .B KEYCTL_SESSION_TO_PARENT
80 These operations are also exposed through the
87 keyctl session \- [<prog> <arg1> <arg2> ...]
88 keyctl session <name> [<prog> <arg1> <arg2> ...]
104 .BR keyctl_join_session_keyring (3),
105 .BR keyctl_session_to_parent (3),
108 .BR persistent\-keyring (7),
109 .BR process\-keyring (7),
110 .BR thread\-keyring (7),
111 .BR user\-keyring (7),
112 .BR user\-session\-keyring (7),