2 .\" Copyright (C) 2014 Red Hat, Inc. All Rights Reserved.
3 .\" Written by David Howells (dhowells@redhat.com)
5 .\" %%%LICENSE_START(GPLv2+_SW_ONEPARA)
6 .\" This program is free software; you can redistribute it and/or
7 .\" modify it under the terms of the GNU General Public License
8 .\" as published by the Free Software Foundation; either version
9 .\" 2 of the License, or (at your option) any later version.
12 .TH SESSION-KEYRING 7 2017-09-15 Linux "Linux Programmer's Manual"
14 session-keyring \- session shared process keyring
16 The session keyring is a keyring used to anchor keys on behalf of a process.
17 It is typically created by
19 when a user logs in and a link will be added that refers to the
21 Optionally, PAM may revoke the session keyring on logout.
22 (In typical configurations, PAM does do this revocation.)
23 The session keyring has the name (description)
26 A special serial number value,
27 .BR KEY_SPEC_SESSION_KEYRING ,
28 is defined that can be used in lieu of the actual serial number of
29 the calling process's session keyring.
33 utility, '\fB@s\fP' can be used instead of a numeric key ID in
36 A process's session keyring is inherited across
44 even when the executable is set-user-ID or set-group-ID or has capabilities.
45 The session keyring is destroyed when the last process that
48 If a process doesn't have a session keyring when it is accessed, then,
49 under certain circumstances, the
50 .BR user-session-keyring (7)
51 will be attached as the session keyring
52 and under others a new session keyring will be created.
54 .BR user-session-keyring (7)
56 .SS Special operations
59 library provides the following special operations for manipulating
62 .BR keyctl_join_session_keyring (3)
63 This operation allows the caller to change the session keyring
64 that it subscribes to.
65 The caller can join an existing keyring with a specified name (description),
66 create a new keyring with a given name,
67 or ask the kernel to create a new "anonymous"
68 session keyring with the name "_ses".
69 (This function is an interface to the
71 .B KEYCTL_JOIN_SESSION_KEYRING
74 .BR keyctl_session_to_parent (3)
75 This operation allows the caller to make the parent process's
76 session keyring to the same as its own.
77 For this to succeed, the parent process must have
78 identical security attributes and must be single threaded.
79 (This function is an interface to the
81 .B KEYCTL_SESSION_TO_PARENT
84 These operations are also exposed through the
91 keyctl session - [<prog> <arg1> <arg2> ...]
92 keyctl session <name> [<prog> <arg1> <arg2> ...]
108 .BR keyctl_join_session_keyring (3),
109 .BR keyctl_session_to_parent (3),
111 .BR persistent\-keyring (7),
112 .BR process\-keyring (7),
113 .BR thread\-keyring (7),
114 .BR user\-keyring (7),
115 .BR user\-session\-keyring (7),