KEYCTL_REVOKE(3)
π KEYCTL_REVOKE β revoke a key π
okay so bestie, welcome to the keyutils corner of the Linux Key Management Calls, and today we're doing KEYCTL_REVOKE(3) β the β¨ "actually no, we're done here" β¨ of key management. it's giving main character energy for a function that just... says bye. let's get into it π
β¨ NAME β¨
keyctl_revoke β revoke a key π
π¦ SYNOPSIS π¦
#include <keyutils.h>
long keyctl_revoke(key_serial_t key);
like, that's it. one include, one function, one key_serial_t. slay π«Ά
πΈ DESCRIPTION πΈ
keyctl_revoke() marks a key as being revoked. that's the whole vibe. you're telling the kernel "this key? cancelled. periodt."
After this operation has been performed on a key, attempts to access it will meet with error EKEYREVOKED. so like, it's not gone-gone, it's just... not welcome here anymore π
heads up bestie: The caller must have write permission on a key to be able to revoke it. no write perms, no revoke. that's the rules β
π RETURN VALUE π
On success keyctl_revoke() returns 0. iconique. flawless. no notes.
On error, the value -1 will be returned and errno will have been set to an appropriate error. so always check that errno, fr fr π
π₯ ERRORS π₯
ENOKEYβ The specified key does not exist. it's not there. never was. you're looking for a ghost π»EKEYREVOKEDβ The key has already been revoked. bestie... you already did this. it's already cancelled. no need to double-cancel πEACCESβ The named key exists, but is not writable by the calling process. it's real, it's right there, but it is not letting you touch it π
π§ LINKING π§
This is a library function that can be found in libkeyutils. When linking, -lkeyutils should be specified to the linker. don't forget it or the linker will simply not know her π
π SEE ALSO π
okay that's the whole page, you ate that π«Ά go forth and revoke responsibly, bestie. this little guide is from the Linux keyutils world, dated 4 May 2006 β yeah she's vintage but she still serves πβ¨π
π¦ where this page comes from
- alpine 3.22: keyutils-doc 1.6.3-r4 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- alpine 3.23: keyutils-doc 1.6.3-r4 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- alpine 3.24: keyutils-doc 1.6.3-r4 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- arch rolling: keyutils 1.6.3-4 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- centos-stream 10: keyutils-libs-devel 1.6.3-5.el10 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- centos-stream 9: keyutils-libs-devel 1.6.3-1.el9 Β· GPLv2+ and LGPLv2+
- centos-stream 9: keyutils-libs-devel 1.6.3-1.el9 Β· GPLv2+ and LGPLv2+
- debian bookworm: libkeyutils-dev 1.6.3-2 Β· GPL-2.0-or-later
- debian trixie: libkeyutils-dev 1.6.3-6 Β· GPL-2.0-or-later
- fedora 43: keyutils-libs-devel 1.6.3-6.fc43 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- fedora 43: keyutils-libs-devel 1.6.3-6.fc43 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- fedora 44: keyutils-libs-devel 1.6.3-7.fc44 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- fedora 44: keyutils-libs-devel 1.6.3-7.fc44 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- nixpkgs unstable: keyutils 1.6.3
- opensuse-leap 16.0: keyutils 1.6.3-160000.3.2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: keyutils 1.6.3-160000.3.2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: keyutils 1.6.3-160000.3.2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: keyutils 1.6.3-160000.3.2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- ubuntu noble: libkeyutils-dev 1.6.3-3build1 Β· GPL-2.0-or-later
- ubuntu questing: libkeyutils-dev 1.6.3-6ubuntu2
- ubuntu resolute: libkeyutils-dev 1.6.3-6ubuntu3 Β· GPL-2.0-or-later
- ubuntu stonking: libkeyutils-dev 1.6.3-6ubuntu3 Β· GPL-2.0-or-later
- Copyright (C) 2006 Red Hat, Inc. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms