1KEYCTL_UPDATE(3)          Linux Key Management Calls          KEYCTL_UPDATE(3)
2
3
4

NAME

6       keyctl_update - update a key
7

SYNOPSIS

9       #include <keyutils.h>
10
11       long keyctl_update(key_serial_t key, const void *payload,
12       size_t plen);
13

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

LINKING

51       This  is  a  library  function  that can be found in libkeyutils.  When
52       linking, -lkeyutils should be specified to the linker.
53

SEE ALSO

55       keyctl(1), add_key(2), keyctl(2), request_key(2), keyctl(3),
56       keyrings(7), keyutils(7)
57
58
59
60Linux                             4 May 2006                  KEYCTL_UPDATE(3)
Impressum