KEYCTL_CLEAR(3)
β¨ KEYCTL_CLEAR(3) β¨
okay so bestie, welcome to the Linux Key Management Calls corner of the manual, where we talk about keyctl_clear β the girl whose whole job is clearing a keyring. that's it. that's the gig. π
πΈ NAME πΈ
keyctl_clear β clear a keyring π
π SYNOPSIS π
#include <keyutils.h>
long keyctl_clear(key_serial_t keyring);
π¦ DESCRIPTION π¦
so basically keyctl_clear() clears the contents of a keyring. boom. empty. gone. iconic β¨
but hold up β the caller must have write permission on a keyring to be able to clear it. no write permission, no clearing, no exceptions, no cap. π
π RETURN VALUE π
- on success,
keyctl_clear()returns0π«Ά - on error, the value
-1will be returned anderrnowill have been set to an appropriate error π
π ERRORS π
ENOKEYβ the keyring specified is invalid. it's giving "who? never heard of her" πEKEYEXPIREDβ the keyring specified has expired. she's done, she's moved on β³EKEYREVOKEDβ the keyring specified had been revoked. cancelled, fr fr π«EACCESβ the keyring exists, but is not writable by the calling process. she's real, she's just not letting you in π
π 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 bestie, or the linker will simply not know her π€
π SEE ALSO π
keyctl(1), add_key(2), keyctl(2), request_key(2), keyctl(3), keyrings(7), keyutils(7)
and that's the whole page, babe π§π this one's from the Linux crew, dated 4 May 2006 β yeah she's vintage, and she still ate. periodt. ππΈ
π¦ 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