1KEYCTL_UPDATE(3) Linux Key Management Calls KEYCTL_UPDATE(3)
2
3
4
6 keyctl_update - Update a key
7
9 #include <keyutils.h>
10
11 long keyctl_update(key_serial_t key, const char *payload,
12 size_t plen);
13
15 keyctl_update() updates the payload of a key if the key type permits
16 it.
17
18 The caller must have write permission on a key to be able update it.
19
20 payload and plen specify the data for the new payload. payload may be
21 NULL and plen may be zero if the key type permits that. The key type
22 may reject the data if it's in the wrong format or in some other way
23 invalid.
24
26 On success keyctl_update() returns 0. On error, the value -1 will be
27 returned and errno will have been set to an appropriate error.
28
30 ENOKEY The key specified is invalid.
31
32 EKEYEXPIRED
33 The key specified has expired.
34
35 EKEYREVOKED
36 The key specified had been revoked.
37
38 EINVAL The payload data was invalid.
39
40 ENOMEM Insufficient memory to store the new payload.
41
42 EDQUOT The key quota for this user would be exceeded by increasing the
43 size of the key to accommodate the new payload.
44
45 EACCES The key exists, but is not writable by the calling process.
46
47 EOPNOTSUPP
48 The key type does not support the update operation on its keys.
49
51 This is a library function that can be found in libkeyutils. When
52 linking, -lkeyutils should be specified to the linker.
53
55 keyctl(1),
56 add_key(2),
57 keyctl(2),
58 request_key(2),
59 keyctl_get_keyring_ID(3),
60 keyctl_join_session_keyring(3),
61 keyctl_revoke(3),
62 keyctl_chown(3),
63 keyctl_setperm(3),
64 keyctl_describe(3),
65 keyctl_clear(3),
66 keyctl_link(3),
67 keyctl_unlink(3),
68 keyctl_search(3),
69 keyctl_read(3),
70 keyctl_instantiate(3),
71 keyctl_negate(3),
72 keyctl_set_reqkey_keyring(3),
73 keyctl_set_timeout(3),
74 keyctl_assume_authority(3),
75 keyctl_describe_alloc(3),
76 keyctl_read_alloc(3),
77 request-key(8)
78
79
80
81Linux 4 May 2006 KEYCTL_UPDATE(3)