Debian Codegraph @

upstream/fedora-44/man2const/KEYCTL_REVOKE.2const

raw
1 .\" Copyright 2016, Michael Kerrisk <[email protected]>
2 .\" Copyright 2016, Eugene Syromyatnikov <[email protected]>
3 .\" A very few fragments remain from an earlier version of this page
4 .\" written by David Howells ([email protected])
5 .\" Copyright 2024, Alejandro Colomar <[email protected]>
6 .\"
7 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
8 .\"
9 .TH KEYCTL_REVOKE 2const 2024-08-21 "Linux man-pages 6.13"
10 .SH NAME
11 KEYCTL_REVOKE
12 \-
13 revoke a key
14 .SH LIBRARY
15 Standard C library
16 .RI ( libc ,\~ \-lc )
17 .SH SYNOPSIS
18 .nf
19 .BR "#include <linux/keyctl.h>" " /* Definition of " KEY* " constants */"
20 .BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
21 .B #include <unistd.h>
22 .P
23 .BI "long syscall(SYS_keyctl, KEYCTL_REVOKE, key_serial_t " key );
24 .fi
25 .SH DESCRIPTION
26 Revoke the key with the ID provided in
27 .IR key .
28 The key is scheduled for garbage collection;
29 it will no longer be findable,
30 and will be unavailable for further operations.
31 Further attempts to use the key will fail with the error
32 .BR EKEYREVOKED .
33 .P
34 The caller must have
35 .I write
36 or
37 .I setattr
38 permission on the key.
39 .\" Keys with the KEY_FLAG_KEEP bit set cause an EPERM
40 .\" error for KEYCTL_REVOKE. Does this need to be documented?
41 .\" David Howells: No significance for user space.
42 .SH RETURN VALUE
43 On success,
44 0 is returned.
45 .P
46 On error, \-1 is returned, and
47 .I errno
48 is set to indicate the error.
49 .SH VERSIONS
50 A wrapper is provided in the
51 .I libkeyutils
52 library:
53 .BR keyctl_revoke (3).
54 .SH STANDARDS
55 Linux.
56 .SH HISTORY
57 Linux 2.6.10.
58 .SH SEE ALSO
59 .BR keyctl (2),
60 .BR keyctl_revoke (3)