KEYCTL_UPDATE − update a key’s data payload
Standard C library (libc, −lc)
#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);
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.
On success, 0 is returned.
On error, −1 is returned, and errno is set to indicate the error.
The key type does not support updating.
A wrapper is provided in the libkeyutils library: keyctl_update(3).
Linux.
Linux 2.6.10.
keyctl(2), keyctl_update(3)