1KEYCTL_SET_TIMEOUT(3) Linux Key Management Calls KEYCTL_SET_TIMEOUT(3)
2
3
4
6 keyctl_set_timeout - set the expiration timer on a key
7
9 #include <keyutils.h>
10
11 long keyctl_set_timeout(key_serial_t key, unsigned timeout);
12
14 keyctl_set_timeout() sets the expiration timer on a key to timeout sec‐
15 onds into the future. Setting timeout to zero cancels the expiration,
16 assuming the key hasn't already expired.
17
18 When the key expires, further attempts to access it will be met with
19 error EKEYEXPIRED.
20
21 The caller must have setattr permission on a key to be able change its
22 permissions mask.
23
25 On success keyctl_set_timeout() returns 0 . On error, the value -1
26 will be returned and errno will have been set to an appropriate error.
27
29 ENOKEY The specified key does not exist.
30
31 EKEYEXPIRED
32 The specified key has already expired.
33
34 EKEYREVOKED
35 The specified key has been revoked.
36
37 EACCES The named key exists, but does not grant setattr permission to
38 the calling process.
39
41 This is a library function that can be found in libkeyutils. When
42 linking, -lkeyutils should be specified to the linker.
43
45 keyctl(1), add_key(2), keyctl(2), request_key(2), keyctl(3),
46 keyrings(7), keyutils(7)
47
48
49
50Linux 4 May 2006 KEYCTL_SET_TIMEOUT(3)