mirror of https://github.com/mkerrisk/man-pages
add_key.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
399d0bade2
commit
46661ad999
|
@ -16,12 +16,12 @@ add_key \- add a key to the kernel's key management facility
|
|||
.nf
|
||||
.B #include <sys/types.h>
|
||||
.B #include <keyutils.h>
|
||||
.sp
|
||||
.PP
|
||||
.BI "key_serial_t add_key(const char *" type ", const char *" description ,
|
||||
.BI " const void *" payload ", size_t " plen ,
|
||||
.BI " key_serial_t " keyring ");"
|
||||
.fi
|
||||
|
||||
.PP
|
||||
No glibc wrapper is provided for this system call; see NOTES.
|
||||
.SH DESCRIPTION
|
||||
.BR add_key ()
|
||||
|
@ -121,7 +121,7 @@ This key type is essentially the same as
|
|||
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
|
||||
This key type vets the
|
||||
.I description
|
||||
to ensure that it is qualified by a "service" prefix,
|
||||
|
@ -226,18 +226,18 @@ 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
|
||||
.in +4n
|
||||
.nf
|
||||
.EX
|
||||
$ \fB./a.out user mykey "Some payload"\fP
|
||||
Key ID is 64a4dca
|
||||
$ \fBgrep \(aq64a4dca\(aq /proc/keys\fP
|
||||
064a4dca I--Q--- 1 perm 3f010000 1000 1000 user mykey: 12
|
||||
.fi
|
||||
.EE
|
||||
.in
|
||||
.SS Program source
|
||||
\&
|
||||
.nf
|
||||
.EX
|
||||
#include <sys/types.h>
|
||||
#include <keyutils.h>
|
||||
#include <stdio.h>
|
||||
|
@ -266,7 +266,7 @@ main(int argc, char *argv[])
|
|||
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
.fi
|
||||
.EE
|
||||
.SH SEE ALSO
|
||||
.ad l
|
||||
.nh
|
||||
|
@ -282,7 +282,7 @@ main(int argc, char *argv[])
|
|||
.BR thread\-keyring (7),
|
||||
.BR user\-keyring (7),
|
||||
.BR user\-session\-keyring (7)
|
||||
|
||||
.PP
|
||||
The kernel source files
|
||||
.IR Documentation/security/keys.txt
|
||||
and
|
||||
|
|
Loading…
Reference in New Issue