| 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 process-keyring 7 2026-02-08 "Linux man-pages 6.18" |
| 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, |
| 23 |
.RB ' @p ' |
| 24 |
can be used instead of a numeric key ID in |
| 25 |
much the same way, but since |
| 26 |
.BR keyctl (1) |
| 27 |
is a program run after forking, this is of no utility. |
| 28 |
.P |
| 29 |
A thread created using the |
| 30 |
.BR clone (2) |
| 31 |
.B CLONE_THREAD |
| 32 |
flag has the same process keyring as the caller of |
| 33 |
.BR clone (2). |
| 34 |
When a new process is created using |
| 35 |
.BR fork () |
| 36 |
it initially has no process keyring. |
| 37 |
A process's process keyring is cleared on |
| 38 |
.BR execve (2). |
| 39 |
The process keyring is destroyed when the last |
| 40 |
thread that refers to it terminates. |
| 41 |
.P |
| 42 |
If a process doesn't have a process keyring when it is accessed, |
| 43 |
then the process keyring will be created if the keyring is to be modified; |
| 44 |
otherwise, the error |
| 45 |
.B ENOKEY |
| 46 |
results. |
| 47 |
.SH SEE ALSO |
| 48 |
.ad l |
| 49 |
.nh |
| 50 |
.BR keyctl (1), |
| 51 |
.BR keyctl (3), |
| 52 |
.BR keyrings (7), |
| 53 |
.BR persistent\-keyring (7), |
| 54 |
.BR session\-keyring (7), |
| 55 |
.BR thread\-keyring (7), |
| 56 |
.BR user\-keyring (7), |
| 57 |
.BR user\-session\-keyring (7) |