.\" 2 of the License, or (at your option) any later version.
.\"
.TH ADD_KEY 2 2010-02-25 Linux "Linux Key Management Calls"
-.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH NAME
add_key \- Add a key to the kernel's key management facility
-.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH SYNOPSIS
.nf
.B #include <keyutils.h>
.sp
.BI "key_serial_t add_key(const char *" type ", const char *" description ,
.BI "const void *" payload ", size_t " plen ", key_serial_t " keyring ");"
-.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH DESCRIPTION
.BR add_key ()
asks the kernel to create or update a key of the given
.TP
.B KEY_SPEC_USER_SESSION_KEYRING
This specifies the caller's UID-session keyring.
-.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH KEY TYPES
There are a number of key types available in the core key management code, and
these can be specified to this function:
should be specified, and
.I plen
should be zero.
-.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH RETURN VALUE
On success
.BR add_key ()
On error, the value
.B -1
will be returned and errno will have been set to an appropriate error.
-.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH ERRORS
.TP
.B ENOKEY
.TP
.B EACCES
The keyring wasn't available for modification by the user.
-.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH LINKING
Although this is a Linux system call, it is not present in
.I libc
When linking,
.B -lkeyutils
should be specified to the linker.
-.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH SEE ALSO
.BR keyctl (1),
.BR keyctl (2),
.\" 2 of the License, or (at your option) any later version.
.\"
.TH KEYCTL 2 2010-02-25 Linux "Linux Key Management Calls"
-.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH NAME
keyctl \- Manipulate the kernel's key management facility
-.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH SYNOPSIS
.nf
.B #include <keyutils.h>
.sp
.BI "long keyctl(int " cmd ", ...);"
-.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH DESCRIPTION
.BR keyctl ()
has a number of functions available:
See the
.B See Also
section at the bottom.
-.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH RETURN VALUE
On success
.BR keyctl ()
On error, the value
.B -1
will be returned and errno will have been set to an appropriate error.
-.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH ERRORS
.TP
.B ENOKEY
.TP
.B EACCES
A key operation wasn't permitted.
-.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH LINKING
Although this is a Linux system call, it is not present in
.I libc
When linking,
.B -lkeyutils
should be specified to the linker.
-.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH SEE ALSO
.BR keyctl (1),
.br
.\" 2 of the License, or (at your option) any later version.
.\"
.TH REQUEST_KEY 2 2010-02-25 Linux "Linux Key Management Calls"
-.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH NAME
request_key \- Request a key from the kernel's key management facility
-.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH SYNOPSIS
.nf
.B #include <keyutils.h>
.sp
.BI "key_serial_t request_key(const char *" type ", const char *" description ,
.BI "const char *" callout_info ", key_serial_t " keyring ");"
-.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH DESCRIPTION
.BR request_key ()
asks the kernel to find a key of the given
will displace any other key of the same type and description from the
destination
.IR keyring .
-.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH RETURN VALUE
On success
.BR request_key ()
On error, the value
.B -1
will be returned and errno will have been set to an appropriate error.
-.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH ERRORS
.TP
.B ENOKEY
.TP
.B EACCES
The keyring wasn't available for modification by the user.
-.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH LINKING
Although this is a Linux system call, it is not present in
.I libc
When linking,
.B -lkeyutils
should be specified to the linker.
-.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.SH SEE ALSO
.BR keyctl (1),
.BR add_key (2),