diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:41:07 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:41:07 +0000 |
commit | 3af6d22bb3850ab2bac67287e3a3d3b0e32868e5 (patch) | |
tree | 3ee7a3ec64525911fa865bb984c86d997d855527 /man2/add_key.2 | |
parent | Adding debian version 6.05.01-1. (diff) | |
download | manpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.tar.xz manpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.zip |
Merging upstream version 6.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'man2/add_key.2')
-rw-r--r-- | man2/add_key.2 | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/man2/add_key.2 b/man2/add_key.2 index 570db11..6e81ec9 100644 --- a/man2/add_key.2 +++ b/man2/add_key.2 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" -.TH add_key 2 2023-05-03 "Linux man-pages 6.05.01" +.TH add_key 2 2024-02-25 "Linux man-pages 6.7" .SH NAME add_key \- add a key to the kernel's key management facility .SH LIBRARY @@ -13,12 +13,12 @@ Standard C library .SH SYNOPSIS .nf .B #include <keyutils.h> -.PP +.P .BI "key_serial_t add_key(const char *" type ", const char *" description , .BI " const void " payload [. plen "], size_t " plen , .BI " key_serial_t " keyring ");" .fi -.PP +.P .IR Note : There is no glibc wrapper for this system call; see NOTES. .SH DESCRIPTION @@ -34,10 +34,10 @@ of length attaches it to the nominated .IR keyring , and returns the key's serial number. -.PP +.P The key may be rejected if the provided data is in the wrong format or it is invalid in some other way. -.PP +.P If the destination .I keyring already contains a key that matches the specified @@ -55,7 +55,7 @@ and it will displace the link to the extant key from the keyring. .\" is consequently unlinked, then keys that it was anchoring .\" will have their reference count decreased by one (and may .\" consequently be garbage collected). Is this all correct? -.PP +.P The destination .I keyring serial number may be that of a valid keyring for which the caller has @@ -96,7 +96,7 @@ argument to .BR add_key () are the following: .TP -.I """keyring""" +.I \[dq]keyring\[dq] Keyrings are special key types that may contain links to sequences of other keys of any type. If this interface is used to create a keyring, then @@ -105,21 +105,21 @@ should be NULL and .I plen should be zero. .TP -.I """user""" +.I \[dq]user\[dq] This is a general purpose key type whose payload may be read and updated by user-space applications. The key is kept entirely within kernel memory. The payload for keys of this type is a blob of arbitrary data of up to 32,767 bytes. .TP -.IR """logon""" " (since Linux 3.3)" +.IR \[dq]logon\[dq] " (since Linux 3.3)" .\" commit 9f6ed2ca257fa8650b876377833e6f14e272848b This key type is essentially the same as -.IR """user""" , +.IR \[dq]user\[dq] , but it does not permit the key to read. This is suitable for storing payloads that you do not want to be readable from user space. -.PP +.P This key type vets the .I description to ensure that it is qualified by a "service" prefix, @@ -127,15 +127,15 @@ by checking to ensure that the .I description contains a ':' that is preceded by other characters. .TP -.IR """big_key""" " (since Linux 3.13)" +.IR \[dq]big_key\[dq] " (since Linux 3.13)" .\" commit ab3c3587f8cda9083209a61dbe3a4407d3cada10 This key type is similar to -.IR """user""" , +.IR \[dq]user\[dq] , but may hold a payload of up to 1\ MiB. If the key payload is large enough, then it may be stored encrypted in tmpfs (which can be swapped out) rather than kernel memory. -.PP +.P For further details on these key types, see .BR keyrings (7). .SH RETURN VALUE @@ -175,11 +175,11 @@ The payload data was invalid. .B EINVAL .I type was -.I """logon""" +.I \[dq]logon\[dq] and the .I description was not qualified with a prefix string of the form -.IR """service:""" . +.IR \[dq]service:\[dq] . .TP .B EKEYEXPIRED The keyring has expired. @@ -202,7 +202,7 @@ Key types that begin with a period are reserved to the implementation. .B EPERM .I type was -.I """keyring""" +.I \[dq]keyring\[dq] and the .I description started with a period (\[aq].\[aq]). @@ -227,7 +227,7 @@ The program below creates a key with the type, description, and payload specified in its command-line arguments, and links that key into the session keyring. The following shell session demonstrates the use of the program: -.PP +.P .in +4n .EX $ \fB./a.out user mykey "Some payload"\fP @@ -285,7 +285,7 @@ main(int argc, char *argv[]) .BR thread\-keyring (7), .BR user\-keyring (7), .BR user\-session\-keyring (7) -.PP +.P The kernel source files .I Documentation/security/keys/core.rst and |