text
stringlengths
0
234
that was created as a consequence of a call to
.br request_key (2).
for further information, see
.br request_key (2)
and the kernel source file
.ir documentation/security/keys\-request\-key.txt .
.ip
the arguments
.ir arg3 ,
.ir arg4 ,
and
.ir arg5
are ignored.
.ip
this operation is exposed by
.i libkeyutils
via the function
.br keyctl_assume_authority (3).
.tp
.br keyctl_get_security " (since linux 2.6.26)"
.\" commit 70a5bb72b55e82fbfbf1e22cae6975fac58a1e2d
get the lsm (linux security module) security label of the specified key.
.ip
the id of the key whose security label is to be fetched is specified in
.i arg2
(cast to
.ir key_serial_t ).
the security label (terminated by a null byte)
will be placed in the buffer pointed to by
.i arg3
argument (cast to
.ir "char\ *" );
the size of the buffer must be provided in
.i arg4
(cast to
.ir size_t ).
.ip
if
.i arg3
is specified as null or the buffer size specified in
.ir arg4
is too small, the full size of the security label string
(including the terminating null byte)
is returned as the function result,
and nothing is copied to the buffer.
.ip
the caller must have
.i view
permission on the specified key.
.ip
the returned security label string will be rendered in a form appropriate
to the lsm in force.
for example, with selinux, it may look like:
.ip
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
.ip
if no lsm is currently in force,
then an empty string is placed in the buffer.
.ip
the
.i arg5
argument is ignored.
.ip
this operation is exposed by
.i libkeyutils
via the functions
.br keyctl_get_security (3)
and
.br keyctl_get_security_alloc (3).
.tp
.br keyctl_session_to_parent " (since linux 2.6.32)"
.\" commit ee18d64c1f632043a02e6f5ba5e045bb26a5465f
replace the session keyring to which the
.i parent
of the calling process
subscribes with the session keyring of the calling process.
.\" what is the use case for keyctl_session_to_parent?
.\" david howells: the process authentication groups people requested this,
.\" but then didn't use it; maybe there are no users.
.ip
the keyring will be replaced in the parent process at the point
where the parent next transitions from kernel space to user space.
.ip
the keyring must exist and must grant the caller
.i link
permission.
the parent process must be single-threaded and have
the same effective ownership as this process
and must not be set-user-id or set-group-id.
the uid of the parent process's existing session keyring (f it has one),
as well as the uid of the caller's session keyring
much match the caller's effective uid.
.ip
the fact that it is the parent process that is affected by this operation
allows a program such as the shell to start a child process that
uses this operation to change the shell's session keyring.
(this is what the
.br keyctl (1)
.b new_session
command does.)