text
stringlengths
0
234
.i operation
was
.b keyctl_read
and the key type does not support reading
(e.g., the type is
.ir """login""" ).
.tp
.b eopnotsupp
.i operation
was
.b keyctl_update
and the key type does not support updating.
.tp
.b eopnotsupp
.i operation
was
.br keyctl_restrict_keyring ,
the type provided in
.i arg3
argument was "asymmetric", and the key specified in the restriction specification
provided in
.i arg4
has type other than "asymmetric" or "keyring".
.tp
.b eperm
.i operation
was
.br keyctl_get_persistent ,
.i arg2
specified a uid other than the calling thread's real or effective uid,
and the caller did not have the
.b cap_setuid
capability.
.tp
.b eperm
.i operation
was
.br keyctl_session_to_parent
and either:
all of the uids (gids) of the parent process do not match
the effective uid (gid) of the calling process;
the uid of the parent's existing session keyring or
the uid of the caller's session keyring did not match
the effective uid of the caller;
the parent process is not single-thread;
or the parent process is
.br init (1)
or a kernel thread.
.tp
.b etimedout
.i operation
was
.b keyctl_dh_compute
and the initialization of crypto modules has timed out.
.sh versions
this system call first appeared in linux 2.6.10.
.sh conforming to
this system call is a nonstandard linux extension.
.sh notes
a wrapper is provided in the
.ir libkeyutils
library.
(the accompanying package provides the
.i <keyutils.h>
header file.)
when employing the wrapper in that library, link with
.ir \-lkeyutils .
however, rather than using this system call directly,
you probably want to use the various library functions
mentioned in the descriptions of individual operations above.
.sh examples
the program below provide subset of the functionality of the
.br request\-key (8)
program provided by the
.i keyutils
package.
for informational purposes,
the program records various information in a log file.
.pp
as described in
.br request_key (2),
the
.br request\-key (8)
program is invoked with command-line arguments that
describe a key that is to be instantiated.
the example program fetches and logs these arguments.
the program assumes authority to instantiate the requested key,
and then instantiates that key.
.pp
the following shell session demonstrates the use of this program.
in the session,
we compile the program and then use it to temporarily replace the standard
.br request\-key (8)
program.
(note that temporarily disabling the standard
.br request\-key (8)
program may not be safe on some systems.)
while our example program is installed,
we use the example program shown in
.br request_key (2)