2
.\" Copyright (C) 2014 Red Hat, Inc. All Rights Reserved.
3
.\" Written by David Howells (dhowells@redhat.com)
5
.\" This program is free software; you can redistribute it and/or
6
.\" modify it under the terms of the GNU General Public Licence
7
.\" as published by the Free Software Foundation; either version
8
.\" 2 of the Licence, or (at your option) any later version.
10
.TH "USER-SESSION-KEYRING" 7 "20 Feb 2014" Linux "Kernel key management"
11
.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
13
user-session-keyring \- Per-user default session keyring
16
.B user session keyring
17
is a keyring used to anchor keys on behalf of a user. Each UID the kernel
18
deals with has its own user session keyring. This keyring is associated with
19
the record that the kernel maintains for the UID and, once created, is retained
20
as long as that record persists. It is shared amongst all processes of that
23
The user session keyring is created on demand when a thread requests it or when
24
a thread asks for its \fBsession keyring\fP and that doesn't exist. In the
25
latter case, a user session keyring will be created and, if the session keyring
26
wasn't to be created, the user session keyring will be set as the process's
27
actual session keyring.
29
The user session keyring is searched by \fBrequest_key\fP() if the actual
30
session keyring does not exist and is ignored otherwise.
32
A special serial number value, \fBKEY_SPEC_USER_SESSION_KEYRING\fP, is defined
33
that can be used in lieu of the calling process's user session keyring's actual
36
From the keyctl utility, '\fB@us\fP' can be used instead of a numeric key ID in
39
User session keyrings are independent of clone(), fork(), vfork(), execve() and
40
exit() excepting that the keyring is destroyed when the UID record is destroyed
41
when the last process pinning it exits.
43
If a user session keyring does not exist when it is accessed, it will be
46
It is strongly recommended that a \fBsession keyring\fP be set explicitly, for
47
example by \fBpam_keyinit\fP, rather than relying on the user session keyring -
48
particularly if a process is running as root.
49
.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
57
.BR process-keyring (7),
59
.BR session-keyring (7),
61
.BR thread-keyring (7),
65
.BR persistent-keyring (7)