KEYCTL_REVOKE(2const) KEYCTL_REVOKE(2const)

KEYCTL_REVOKE - revoke a key

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(SYS_keyctl, KEYCTL_REVOKE, key_serial_t key);

Revoke the key with the ID provided in key. The key is scheduled for garbage collection; it will no longer be findable, and will be unavailable for further operations. Further attempts to use the key will fail with the error EKEYREVOKED.

The caller must have write or setattr permission on the key.

On success, 0 is returned.

On error, -1 is returned, and errno is set to indicate the error.

A wrapper is provided in the libkeyutils library: keyctl_revoke(3).

Linux.

Linux 2.6.10.

keyctl(2), keyctl_revoke(3)

2024-08-21 Linux man-pages 6.10