Provided by: manpages-dev_6.16-1_all 

NAME
KEYCTL_UPDATE - update a key's data payload
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <linux/keyctl.h> /* Definition of KEY* constants */
#include <sys/syscall.h> /* Definition of SYS_* constants */
#include <unistd.h>
long syscall(size_t size;
SYS_keyctl, KEYCTL_UPDATE, key_serial_t key,
void payload[size], size_t size);
DESCRIPTION
Update a key's data payload.
key specifies the ID of the key to be updated. payload points to the new payload and size contains the
new payload size in bytes.
The caller must have write permission on the key specified and the key type must support updating.
A negatively instantiated key (see KEYCTL_REJECT(2const)) can be positively instantiated with this
operation.
RETURN VALUE
On success, 0 is returned.
On error, -1 is returned, and errno is set to indicate the error.
ERRORS
The key type does not support updating.
VERSIONS
A wrapper is provided in the libkeyutils library: keyctl_update(3).
STANDARDS
Linux.
HISTORY
Linux 2.6.10.
SEE ALSO
keyctl(2), keyctl_update(3)
Linux man-pages 6.16 2025-06-28 KEYCTL_UPDATE(2const)