text
stringlengths 0
234
|
---|
set a timeout on a key. |
.ip |
the id of the key is specified in |
.i arg2 |
(cast to |
.ir key_serial_t ). |
the timeout value, in seconds from the current time, |
is specified in |
.i arg3 |
(cast to |
.ir "unsigned int" ). |
the timeout is measured against the realtime clock. |
.ip |
specifying the timeout value as 0 clears any existing timeout on the key. |
.ip |
the |
.i /proc/keys |
file displays the remaining time until each key will expire. |
(this is the only method of discovering the timeout on a key.) |
.ip |
the caller must either have the |
.i setattr |
permission on the key |
or hold an instantiation authorization token for the key (see |
.br request_key (2)). |
.ip |
the key and any links to the key will be |
automatically garbage collected after the timeout expires. |
subsequent attempts to access the key will then fail with the error |
.br ekeyexpired . |
.ip |
this operation cannot be used to set timeouts on revoked, expired, |
or negatively instantiated keys. |
.ip |
the arguments |
.ir arg4 |
and |
.ir arg5 |
are ignored. |
.ip |
this operation is exposed by |
.i libkeyutils |
via the function |
.br keyctl_set_timeout (3). |
.tp |
.br keyctl_assume_authority " (since linux 2.6.16)" |
assume (or divest) the authority for the calling thread |
to instantiate a key. |
.ip |
the |
.i arg2 |
argument (cast to |
.ir key_serial_t ) |
specifies either a nonzero key id to assume authority, |
or the value 0 to divest authority. |
.ip |
if |
.i arg2 |
is nonzero, then it specifies the id of an uninstantiated key for which |
authority is to be assumed. |
that key can then be instantiated using one of |
.br keyctl_instantiate , |
.br keyctl_instantiate_iov , |
.br keyctl_reject , |
or |
.br keyctl_negate . |
once the key has been instantiated, |
the thread is automatically divested of authority to instantiate the key. |
.ip |
authority over a key can be assumed only if the calling thread has present |
in its keyrings the authorization key that is |
associated with the specified key. |
(in other words, the |
.br keyctl_assume_authority |
operation is available only from a |
.br request\-key (8)-style |
program; see |
.br request_key (2) |
for an explanation of how this operation is used.) |
the caller must have |
.i search |
permission on the authorization key. |
.ip |
if the specified key has a matching authorization key, |
then the id of that key is returned. |
the authorization key can be read |
.rb ( keyctl_read ) |
to obtain the callout information passed to |
.br request_key (2). |
.ip |
if the id given in |
.i arg2 |
is 0, then the currently assumed authority is cleared (divested), |
and the value 0 is returned. |
.ip |
the |
.br keyctl_assume_authority |
mechanism allows a program such as |
.br request\-key (8) |
to assume the necessary authority to instantiate a new uninstantiated key |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.