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 specied 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),
46 add_key(2),
47 keyctl(2),
48 request_key(2),
49 keyctl_get_keyring_ID(3),
50 keyctl_join_session_keyring(3),
51 keyctl_update(3),
52 keyctl_revoke(3),
53 keyctl_chown(3),
54 keyctl_setperm(3),
55 keyctl_describe(3),
56 keyctl_clear(3),
57 keyctl_link(3),
58 keyctl_unlink(3),
59 keyctl_search(3),
60 keyctl_read(3),
61 keyctl_instantiate(3),
62 keyctl_negate(3),
63 keyctl_set_reqkey_keyring(3),
64 keyctl_assume_authority(3),
65 keyctl_describe_alloc(3),
66 keyctl_read_alloc(3),
67 request-key(8)
68
69
70
71Linux 4 May 2006 KEYCTL_SET_TIMEOUT(3)