summaryrefslogtreecommitdiffstats
path: root/man2/add_key.2
diff options
context:
space:
mode:
Diffstat (limited to 'man2/add_key.2')
-rw-r--r--man2/add_key.218
1 files changed, 9 insertions, 9 deletions
diff --git a/man2/add_key.2 b/man2/add_key.2
index d1f96900c..570db1170 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-02-05 "Linux man-pages 6.03"
+.TH add_key 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
add_key \- add a key to the kernel's key management facility
.SH LIBRARY
@@ -208,10 +208,10 @@ and the
started with a period (\[aq].\[aq]).
Keyrings with descriptions (names)
that begin with a period are reserved to the implementation.
-.SH VERSIONS
-This system call first appeared in Linux 2.6.10.
.SH STANDARDS
-This system call is a nonstandard Linux extension.
+Linux.
+.SH HISTORY
+Linux 2.6.10.
.SH NOTES
glibc does not provide a wrapper for this system call.
A wrapper is provided in the
@@ -245,27 +245,27 @@ $ \fBgrep \[aq]64a4dca\[aq] /proc/keys\fP
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
int
main(int argc, char *argv[])
{
key_serial_t key;
-
+\&
if (argc != 4) {
fprintf(stderr, "Usage: %s type description payload\en",
argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
key = add_key(argv[1], argv[2], argv[3], strlen(argv[3]),
KEY_SPEC_SESSION_KEYRING);
if (key == \-1) {
perror("add_key");
exit(EXIT_FAILURE);
}
-
+\&
printf("Key ID is %jx\en", (uintmax_t) key);
-
+\&
exit(EXIT_SUCCESS);
}
.EE