Manpage logo

KEYCTL_UPDATE - update a key's data payload

NAME  LIBRARY  SYNOPSIS  DESCRIPTION  RETURN VALUE  ERRORS  VERSIONS  STANDARDS  HISTORY  SEE ALSO 

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)


Updated 2026-06-01 - jenkler.se | uex.se