Debian Codegraph @

upstream/fedora-44/man2const/KEYCTL_UPDATE.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_UPDATE 2const 2024-08-21 "Linux man-pages 6.13"
10 .SH NAME
11 KEYCTL_UPDATE
12 \-
13 update a key's data payload
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_UPDATE, key_serial_t " key ,
24 .BI " void " payload [. size "], size_t " size );
25 .fi
26 .SH DESCRIPTION
27 Update a key's data payload.
28 .P
29 .I key
30 specifies the ID of the key to be updated.
31 .I payload
32 points to the new payload and
33 .I size
34 contains the new payload size in bytes.
35 .P
36 The caller must have
37 .I write
38 permission on the key specified and the key type must support updating.
39 .P
40 A negatively instantiated key
41 (see
42 .BR KEYCTL_REJECT (2const))
43 can be positively instantiated with this operation.
44 .SH RETURN VALUE
45 On success,
46 0 is returned.
47 .P
48 On error, \-1 is returned, and
49 .I errno
50 is set to indicate the error.
51 .SH ERRORS
52 .TP
53 The key type does not support updating.
54 .SH VERSIONS
55 A wrapper is provided in the
56 .I libkeyutils
57 library:
58 .BR keyctl_update (3).
59 .SH STANDARDS
60 Linux.
61 .SH HISTORY
62 Linux 2.6.10.
63 .SH SEE ALSO
64 .BR keyctl (2),
65 .BR keyctl_update (3)