mirror of https://github.com/mkerrisk/man-pages
167 lines
3.7 KiB
Groff
167 lines
3.7 KiB
Groff
.\"
|
|
.\" Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
|
|
.\" Written by David Howells (dhowells@redhat.com)
|
|
.\"
|
|
.\" This program is free software; you can redistribute it and/or
|
|
.\" modify it under the terms of the GNU General Public License
|
|
.\" as published by the Free Software Foundation; either version
|
|
.\" 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:
|
|
.TP
|
|
.B KEYCTL_GET_KEYRING_ID
|
|
Ask for a keyring's ID.
|
|
.TP
|
|
.B KEYCTL_JOIN_SESSION_KEYRING
|
|
Join or start named session keyring.
|
|
.TP
|
|
.B KEYCTL_UPDATE
|
|
Update a key.
|
|
.TP
|
|
.B KEYCTL_REVOKE
|
|
Revoke a key.
|
|
.TP
|
|
.B KEYCTL_CHOWN
|
|
Set ownership of a key.
|
|
.TP
|
|
.B KEYCTL_SETPERM
|
|
Set perms on a key.
|
|
.TP
|
|
.B KEYCTL_DESCRIBE
|
|
Describe a key.
|
|
.TP
|
|
.B KEYCTL_CLEAR
|
|
Clear contents of a keyring.
|
|
.TP
|
|
.B KEYCTL_LINK
|
|
Link a key into a keyring.
|
|
.TP
|
|
.B KEYCTL_UNLINK
|
|
Unlink a key from a keyring.
|
|
.TP
|
|
.B KEYCTL_SEARCH
|
|
Search for a key in a keyring.
|
|
.TP
|
|
.B KEYCTL_READ
|
|
Read a key or keyring's contents.
|
|
.TP
|
|
.B KEYCTL_INSTANTIATE
|
|
Instantiate a partially constructed key.
|
|
.TP
|
|
.B KEYCTL_NEGATE
|
|
Negate a partially constructed key.
|
|
.TP
|
|
.B KEYCTL_SET_REQKEY_KEYRING
|
|
Set default request-key keyring.
|
|
.TP
|
|
.B KEYCTL_SET_TIMEOUT
|
|
Set timeout on a key.
|
|
.TP
|
|
.B KEYCTL_ASSUME_AUTHORITY
|
|
Assume authority to instantiate key.
|
|
.P
|
|
These are wrapped by
|
|
.B libkeyutils
|
|
into individual functions to permit compiler the compiler to check types.
|
|
See the
|
|
.B See Also
|
|
section at the bottom.
|
|
.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
.SH RETURN VALUE
|
|
On success
|
|
.BR keyctl ()
|
|
returns the serial number of the key it found.
|
|
On error, the value
|
|
.B -1
|
|
will be returned and errno will have been set to an appropriate error.
|
|
.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
.SH ERRORS
|
|
.TP
|
|
.B ENOKEY
|
|
No matching key was found or an invalid key was specified.
|
|
.TP
|
|
.B EKEYEXPIRED
|
|
An expired key was found or specified.
|
|
.TP
|
|
.B EKEYREVOKED
|
|
A revoked key was found or specified.
|
|
.TP
|
|
.B EKEYREJECTED
|
|
A rejected key was found or specified.
|
|
.TP
|
|
.B EDQUOT
|
|
The key quota for the caller's user would be exceeded by creating a key or
|
|
linking it to the keyring.
|
|
.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
|
|
but can be found rather in
|
|
.IR libkeyutils .
|
|
When linking,
|
|
.B -lkeyutils
|
|
should be specified to the linker.
|
|
.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
.SH SEE ALSO
|
|
.BR keyctl (1),
|
|
.br
|
|
.BR add_key (2),
|
|
.br
|
|
.BR request_key (2),
|
|
.br
|
|
.BR keyctl_get_keyring_ID (3),
|
|
.br
|
|
.BR keyctl_join_session_keyring (3),
|
|
.br
|
|
.BR keyctl_update (3),
|
|
.br
|
|
.BR keyctl_revoke (3),
|
|
.br
|
|
.BR keyctl_chown (3),
|
|
.br
|
|
.BR keyctl_setperm (3),
|
|
.br
|
|
.BR keyctl_describe (3),
|
|
.br
|
|
.BR keyctl_clear (3),
|
|
.br
|
|
.BR keyctl_link (3),
|
|
.br
|
|
.BR keyctl_unlink (3),
|
|
.br
|
|
.BR keyctl_search (3),
|
|
.br
|
|
.BR keyctl_read (3),
|
|
.br
|
|
.BR keyctl_instantiate (3),
|
|
.br
|
|
.BR keyctl_negate (3),
|
|
.br
|
|
.BR keyctl_set_reqkey_keyring (3),
|
|
.br
|
|
.BR keyctl_set_timeout (3),
|
|
.br
|
|
.BR keyctl_assume_authority (3),
|
|
.br
|
|
.BR keyctl_describe_alloc (3),
|
|
.br
|
|
.BR keyctl_read_alloc (3),
|
|
.br
|
|
.BR request-key (8)
|