Debian Codegraph @

upstream/debian-unstable/man7/thread-keyring.7

raw
1 .\" Copyright 2014, Red Hat, Inc.
2 .\" Copyright, the authors of the Linux man-pages project
3 .\"
4 .\" SPDX-License-Identifier: GPL-2.0-or-later
5 .\"
6 .TH thread-keyring 7 2026-02-08 "Linux man-pages 6.18"
7 .SH NAME
8 thread-keyring \- per-thread keyring
9 .SH DESCRIPTION
10 The thread keyring is a keyring used to anchor keys on behalf of a process.
11 It is created only when a thread requests it.
12 The thread keyring has the name (description)
13 .IR _tid .
14 .P
15 A special serial number value,
16 .BR KEY_SPEC_THREAD_KEYRING ,
17 is defined that can be used in lieu of the actual serial number of
18 the calling thread's thread keyring.
19 .P
20 From the
21 .BR keyctl (1)
22 utility,
23 .RB ' @t '
24 can be used instead of a numeric key ID in
25 much the same way, but as
26 .BR keyctl (1)
27 is a program run after forking, this is of no utility.
28 .P
29 Thread keyrings are not inherited across
30 .BR clone (2)
31 and
32 .BR fork (2)
33 and are cleared by
34 .BR execve (2).
35 A thread keyring is destroyed when the thread that refers to it terminates.
36 .P
37 Initially, a thread does not have a thread keyring.
38 If a thread doesn't have a thread keyring when it is accessed,
39 then it will be created if it is to be modified;
40 otherwise the operation fails with the error
41 .BR ENOKEY .
42 .SH SEE ALSO
43 .ad l
44 .nh
45 .BR keyctl (1),
46 .BR keyctl (3),
47 .BR keyrings (7),
48 .BR persistent\-keyring (7),
49 .BR process\-keyring (7),
50 .BR session\-keyring (7),
51 .BR user\-keyring (7),
52 .BR user\-session\-keyring (7)