Debian Codegraph @

upstream/debian-trixie/man7/process-keyring.7

raw
1 .\" Copyright (C) 2014 Red Hat, Inc. All Rights Reserved.
2 .\" Written by David Howells ([email protected])
3 .\"
4 .\" SPDX-License-Identifier: GPL-2.0-or-later
5 .\"
6 .TH process-keyring 7 2024-05-02 "Linux man-pages 6.9.1"
7 .SH NAME
8 process-keyring \- per-process shared keyring
9 .SH DESCRIPTION
10 The process keyring is a keyring used to anchor keys on behalf of a process.
11 It is created only when a process requests it.
12 The process keyring has the name (description)
13 .IR _pid .
14 .P
15 A special serial number value,
16 .BR KEY_SPEC_PROCESS_KEYRING ,
17 is defined that can be used in lieu of the actual serial number of
18 the calling process's process keyring.
19 .P
20 From the
21 .BR keyctl (1)
22 utility, '\fB@p\fP' can be used instead of a numeric key ID in
23 much the same way, but since
24 .BR keyctl (1)
25 is a program run after forking, this is of no utility.
26 .P
27 A thread created using the
28 .BR clone (2)
29 .B CLONE_THREAD
30 flag has the same process keyring as the caller of
31 .BR clone (2).
32 When a new process is created using
33 .BR fork ()
34 it initially has no process keyring.
35 A process's process keyring is cleared on
36 .BR execve (2).
37 The process keyring is destroyed when the last
38 thread that refers to it terminates.
39 .P
40 If a process doesn't have a process keyring when it is accessed,
41 then the process keyring will be created if the keyring is to be modified;
42 otherwise, the error
43 .B ENOKEY
44 results.
45 .SH SEE ALSO
46 .ad l
47 .nh
48 .BR keyctl (1),
49 .BR keyctl (3),
50 .BR keyrings (7),
51 .BR persistent\-keyring (7),
52 .BR session\-keyring (7),
53 .BR thread\-keyring (7),
54 .BR user\-keyring (7),
55 .BR user\-session\-keyring (7)