Assume authority to instantiate key.
These are wrapped by
libkeyutils
into individual functions to permit compiler the compiler to check types.
See the
See Also
section at the bottom.
RETURN VALUE
On success
keyctl()
returns the serial number of the key it found.
On error, the value
-1
will be returned and errno will have been set to an appropriate error.
ERRORS
ENOKEY
No matching key was found or an invalid key was specified.
EKEYEXPIRED
An expired key was found or specified.
EKEYREVOKED
A revoked key was found or specified.
EKEYREJECTED
A rejected key was found or specified.
EDQUOT
The key quota for the caller's user would be exceeded by creating a key or
linking it to the keyring.
EACCES
A key operation wasn't permitted.
LINKING
Although this is a Linux system call, it is not present in
libc
but can be found rather in
libkeyutils.
When linking,
-lkeyutils
should be specified to the linker.