2015-12-17 20:56:48 +03:00
/*
* Copyright ( c ) 2014 - 2015 Dmitry V . Levin < ldv @ altlinux . org >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions
* are met :
* 1. Redistributions of source code must retain the above copyright
* notice , this list of conditions and the following disclaimer .
* 2. Redistributions in binary form must reproduce the above copyright
* notice , this list of conditions and the following disclaimer in the
* documentation and / or other materials provided with the distribution .
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission .
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ` ` AS IS ' ' AND ANY EXPRESS OR
* IMPLIED WARRANTIES , INCLUDING , BUT NOT LIMITED TO , THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED .
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT , INDIRECT ,
* INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT
* NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE ,
* DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT
* ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE .
*/
2014-02-06 02:41:45 +04:00
# include "defs.h"
2016-10-03 21:36:03 +03:00
# include "kernel_types.h"
2014-02-06 02:41:45 +04:00
typedef int32_t key_serial_t ;
2014-04-26 03:30:54 +04:00
# include "xlat/key_spec.h"
2014-02-06 02:41:45 +04:00
2016-10-03 21:35:24 +03:00
struct keyctl_dh_params {
int32_t private ;
int32_t prime ;
int32_t base ;
} ;
2014-02-06 02:41:45 +04:00
static void
print_keyring_serial_number ( key_serial_t id )
{
2016-05-15 00:46:05 +03:00
const char * str = xlookup ( key_spec , ( unsigned int ) id ) ;
2014-02-06 02:41:45 +04:00
if ( str )
tprints ( str ) ;
else
tprintf ( " %d " , id ) ;
}
2015-04-07 04:36:50 +03:00
SYS_FUNC ( add_key )
2014-02-06 02:41:45 +04:00
{
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
/* type */
printstr ( tcp , tcp - > u_arg [ 0 ] , - 1 ) ;
/* description */
tprints ( " , " ) ;
printstr ( tcp , tcp - > u_arg [ 1 ] , - 1 ) ;
/* payload */
tprints ( " , " ) ;
printstr ( tcp , tcp - > u_arg [ 2 ] , tcp - > u_arg [ 3 ] ) ;
/* payload length */
tprintf ( " , %lu, " , tcp - > u_arg [ 3 ] ) ;
/* keyring serial number */
print_keyring_serial_number ( tcp - > u_arg [ 4 ] ) ;
return RVAL_DECODED ;
2014-02-06 02:41:45 +04:00
}
2015-04-07 04:36:50 +03:00
SYS_FUNC ( request_key )
2014-02-06 02:41:45 +04:00
{
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
/* type */
printstr ( tcp , tcp - > u_arg [ 0 ] , - 1 ) ;
/* description */
tprints ( " , " ) ;
printstr ( tcp , tcp - > u_arg [ 1 ] , - 1 ) ;
/* callout_info */
tprints ( " , " ) ;
printstr ( tcp , tcp - > u_arg [ 2 ] , - 1 ) ;
/* keyring serial number */
tprints ( " , " ) ;
print_keyring_serial_number ( tcp - > u_arg [ 3 ] ) ;
return RVAL_DECODED ;
2014-02-06 02:41:45 +04:00
}
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
static void
2014-02-06 02:41:45 +04:00
keyctl_get_keyring_id ( struct tcb * tcp , key_serial_t id , int create )
{
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
print_keyring_serial_number ( id ) ;
tprintf ( " , %d " , create ) ;
2014-02-06 02:41:45 +04:00
}
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
static void
2016-10-03 21:36:03 +03:00
keyctl_update_key ( struct tcb * tcp , key_serial_t id , kernel_ulong_t addr ,
kernel_ulong_t len )
2014-02-06 02:41:45 +04:00
{
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
print_keyring_serial_number ( id ) ;
tprints ( " , " ) ;
printstr ( tcp , addr , len ) ;
2016-10-03 21:36:03 +03:00
tprintf ( " , %llu " , zero_extend_signed_to_ull ( len ) ) ;
2014-02-06 02:41:45 +04:00
}
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
static void
2014-02-06 02:41:45 +04:00
keyctl_handle_key_key ( struct tcb * tcp , key_serial_t id1 , key_serial_t id2 )
{
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
print_keyring_serial_number ( id1 ) ;
tprints ( " , " ) ;
print_keyring_serial_number ( id2 ) ;
2014-02-06 02:41:45 +04:00
}
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
static void
2016-10-03 21:36:03 +03:00
keyctl_read_key ( struct tcb * tcp , key_serial_t id , kernel_ulong_t addr ,
kernel_ulong_t len , bool has_nul )
2014-02-06 02:41:45 +04:00
{
if ( entering ( tcp ) ) {
print_keyring_serial_number ( id ) ;
tprints ( " , " ) ;
} else {
2015-07-20 03:26:23 +03:00
if ( syserror ( tcp ) )
printaddr ( addr ) ;
2014-02-06 02:41:45 +04:00
else {
2016-10-03 21:36:03 +03:00
kernel_ulong_t rval = ( tcp - > u_rval > = 0 ) & &
( ( kernel_ulong_t ) tcp - > u_rval > len ) ? len :
( kernel_ulong_t ) tcp - > u_rval ;
2016-10-03 21:35:51 +03:00
printstr_ex ( tcp , addr , rval , has_nul ?
QUOTE_OMIT_TRAILING_0 : 0 ) ;
2014-02-06 02:41:45 +04:00
}
2016-10-03 21:36:03 +03:00
tprintf ( " , %llu " , zero_extend_signed_to_ull ( len ) ) ;
2014-02-06 02:41:45 +04:00
}
}
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
static void
2016-10-03 21:36:03 +03:00
keyctl_keyring_search ( struct tcb * tcp , key_serial_t id1 , kernel_ulong_t addr1 ,
kernel_ulong_t addr2 , key_serial_t id2 )
2014-02-06 02:41:45 +04:00
{
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
print_keyring_serial_number ( id1 ) ;
tprints ( " , " ) ;
printstr ( tcp , addr1 , - 1 ) ;
tprints ( " , " ) ;
printstr ( tcp , addr2 , - 1 ) ;
tprints ( " , " ) ;
print_keyring_serial_number ( id2 ) ;
2014-02-06 02:41:45 +04:00
}
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
static void
2016-10-03 21:35:57 +03:00
keyctl_chown_key ( struct tcb * tcp , key_serial_t id , unsigned user ,
unsigned group )
2014-02-06 02:41:45 +04:00
{
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
print_keyring_serial_number ( id ) ;
2016-09-29 15:56:02 +03:00
printuid ( " , " , user ) ;
printuid ( " , " , group ) ;
2014-02-06 02:41:45 +04:00
}
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
static void
2016-10-03 21:36:03 +03:00
keyctl_instantiate_key ( struct tcb * tcp , key_serial_t id1 , kernel_ulong_t addr ,
kernel_ulong_t len , key_serial_t id2 )
2014-02-06 02:41:45 +04:00
{
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
print_keyring_serial_number ( id1 ) ;
tprints ( " , " ) ;
printstr ( tcp , addr , len ) ;
2016-10-03 21:36:03 +03:00
tprintf ( " , %llu, " , zero_extend_signed_to_ull ( len ) ) ;
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
print_keyring_serial_number ( id2 ) ;
2014-02-06 02:41:45 +04:00
}
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
static void
2014-02-06 02:41:45 +04:00
keyctl_instantiate_key_iov ( struct tcb * tcp , key_serial_t id1 ,
2016-10-03 21:36:03 +03:00
kernel_ulong_t addr , kernel_ulong_t len ,
2016-10-03 21:35:57 +03:00
key_serial_t id2 )
2014-02-06 02:41:45 +04:00
{
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
print_keyring_serial_number ( id1 ) ;
tprints ( " , " ) ;
2016-06-22 16:27:03 +03:00
tprint_iov ( tcp , len , addr , IOV_DECODE_STR ) ;
2016-10-03 21:36:03 +03:00
tprintf ( " , %llu, " , zero_extend_signed_to_ull ( len ) ) ;
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
print_keyring_serial_number ( id2 ) ;
2014-02-06 02:41:45 +04:00
}
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
static void
2014-02-06 02:41:45 +04:00
keyctl_negate_key ( struct tcb * tcp , key_serial_t id1 , unsigned timeout ,
key_serial_t id2 )
{
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
print_keyring_serial_number ( id1 ) ;
tprintf ( " , %u, " , timeout ) ;
print_keyring_serial_number ( id2 ) ;
2014-02-06 02:41:45 +04:00
}
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
static void
2014-02-06 02:41:45 +04:00
keyctl_reject_key ( struct tcb * tcp , key_serial_t id1 , unsigned timeout ,
unsigned error , key_serial_t id2 )
{
2016-09-29 15:56:35 +03:00
const char * err_str = err_name ( error ) ;
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
print_keyring_serial_number ( id1 ) ;
2016-09-29 15:56:35 +03:00
tprintf ( " , %u, " , timeout ) ;
if ( err_str )
tprintf ( " %s, " , err_str ) ;
else
tprintf ( " %u, " , error ) ;
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
print_keyring_serial_number ( id2 ) ;
2014-02-06 02:41:45 +04:00
}
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
static void
2014-02-06 02:41:45 +04:00
keyctl_set_timeout ( struct tcb * tcp , key_serial_t id , unsigned timeout )
{
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
print_keyring_serial_number ( id ) ;
tprintf ( " , %u " , timeout ) ;
2014-02-06 02:41:45 +04:00
}
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
static void
2016-10-03 21:35:57 +03:00
keyctl_get_persistent ( struct tcb * tcp , unsigned uid , key_serial_t id )
2014-02-06 02:41:45 +04:00
{
2016-09-29 15:56:02 +03:00
printuid ( " " , uid ) ;
tprints ( " , " ) ;
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
print_keyring_serial_number ( id ) ;
2014-02-06 02:41:45 +04:00
}
2014-04-26 03:30:54 +04:00
# include "xlat/key_perms.h"
2014-02-06 02:41:45 +04:00
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
static void
2014-02-06 02:41:45 +04:00
keyctl_setperm_key ( struct tcb * tcp , key_serial_t id , uint32_t perm )
{
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
print_keyring_serial_number ( id ) ;
tprints ( " , " ) ;
printflags ( key_perms , perm , " KEY_??? " ) ;
2014-02-06 02:41:45 +04:00
}
2016-10-03 21:35:24 +03:00
static void
2016-10-03 21:36:03 +03:00
print_dh_params ( struct tcb * tcp , kernel_ulong_t addr )
2016-10-03 21:35:24 +03:00
{
struct keyctl_dh_params params ;
if ( umove_or_printaddr ( tcp , addr , & params ) )
return ;
tprints ( " {private= " ) ;
print_keyring_serial_number ( params . private ) ;
tprints ( " , prime= " ) ;
print_keyring_serial_number ( params . prime ) ;
tprints ( " , base= " ) ;
print_keyring_serial_number ( params . base ) ;
tprints ( " } " ) ;
}
static void
2016-10-03 21:36:03 +03:00
keyctl_dh_compute ( struct tcb * tcp , kernel_ulong_t params , kernel_ulong_t buf ,
kernel_ulong_t len )
2016-10-03 21:35:24 +03:00
{
if ( entering ( tcp ) ) {
print_dh_params ( tcp , params ) ;
tprints ( " , " ) ;
} else {
if ( syserror ( tcp ) ) {
printaddr ( buf ) ;
} else {
2016-10-03 21:36:03 +03:00
kernel_ulong_t rval = ( tcp - > u_rval > = 0 ) & &
( ( kernel_ulong_t ) tcp - > u_rval > len ) ? len :
( kernel_ulong_t ) tcp - > u_rval ;
2016-10-03 21:35:24 +03:00
printstr ( tcp , buf , rval ) ;
}
2016-10-03 21:36:03 +03:00
tprintf ( " , %llu " , zero_extend_signed_to_ull ( len ) ) ;
2016-10-03 21:35:24 +03:00
}
}
2014-04-26 03:30:54 +04:00
# include "xlat/key_reqkeys.h"
# include "xlat/keyctl_commands.h"
2014-02-06 02:41:45 +04:00
2015-04-07 04:36:50 +03:00
SYS_FUNC ( keyctl )
2014-02-06 02:41:45 +04:00
{
int cmd = tcp - > u_arg [ 0 ] ;
2016-10-03 21:36:03 +03:00
unsigned long long arg2 = getarg_ull ( tcp , 1 ) ;
unsigned long long arg3 = getarg_ull ( tcp , 2 ) ;
unsigned long long arg4 = getarg_ull ( tcp , 3 ) ;
unsigned long long arg5 = getarg_ull ( tcp , 4 ) ;
2014-02-06 02:41:45 +04:00
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
if ( entering ( tcp ) ) {
2014-02-06 02:41:45 +04:00
printxval ( keyctl_commands , cmd , " KEYCTL_??? " ) ;
2016-09-29 15:56:20 +03:00
/*
* For now , KEYCTL_SESSION_TO_PARENT is the only cmd without
* arguments .
*/
if ( cmd ! = KEYCTL_SESSION_TO_PARENT )
tprints ( " , " ) ;
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
}
2014-02-06 02:41:45 +04:00
switch ( cmd ) {
case KEYCTL_GET_KEYRING_ID :
2016-10-03 21:36:03 +03:00
keyctl_get_keyring_id ( tcp , arg2 , arg3 ) ;
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_JOIN_SESSION_KEYRING :
2016-10-03 21:36:03 +03:00
printstr ( tcp , arg2 , - 1 ) ;
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_UPDATE :
2016-10-03 21:36:03 +03:00
keyctl_update_key ( tcp , arg2 , arg3 , arg4 ) ;
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_REVOKE :
case KEYCTL_CLEAR :
case KEYCTL_INVALIDATE :
case KEYCTL_ASSUME_AUTHORITY :
2016-10-03 21:36:03 +03:00
print_keyring_serial_number ( arg2 ) ;
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_LINK :
case KEYCTL_UNLINK :
2016-10-03 21:36:03 +03:00
keyctl_handle_key_key ( tcp , arg2 , arg3 ) ;
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_DESCRIBE :
case KEYCTL_READ :
case KEYCTL_GET_SECURITY :
2016-10-03 21:36:03 +03:00
keyctl_read_key ( tcp , arg2 , arg3 , arg4 , cmd ! = KEYCTL_READ ) ;
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
return 0 ;
2014-02-06 02:41:45 +04:00
case KEYCTL_SEARCH :
2016-10-03 21:36:03 +03:00
keyctl_keyring_search ( tcp , arg2 , arg3 , arg4 , arg5 ) ;
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_CHOWN :
2016-10-03 21:36:03 +03:00
keyctl_chown_key ( tcp , arg2 , arg3 , arg4 ) ;
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_SETPERM :
2016-10-03 21:36:03 +03:00
keyctl_setperm_key ( tcp , arg2 , arg3 ) ;
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_INSTANTIATE :
2016-10-03 21:36:03 +03:00
keyctl_instantiate_key ( tcp , arg2 , arg3 , arg4 , arg5 ) ;
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_NEGATE :
2016-10-03 21:36:03 +03:00
keyctl_negate_key ( tcp , arg2 , arg3 , arg4 ) ;
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_SET_REQKEY_KEYRING :
2016-10-03 21:36:03 +03:00
printxval ( key_reqkeys , arg2 , " KEY_REQKEY_DEFL_??? " ) ;
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_SET_TIMEOUT :
2016-10-03 21:36:03 +03:00
keyctl_set_timeout ( tcp , arg2 , arg3 ) ;
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_SESSION_TO_PARENT :
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_REJECT :
2016-10-03 21:36:03 +03:00
keyctl_reject_key ( tcp , arg2 , arg3 , arg4 , arg5 ) ;
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_INSTANTIATE_IOV :
2016-10-03 21:36:03 +03:00
keyctl_instantiate_key_iov ( tcp , arg2 , arg3 , arg4 , arg5 ) ;
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_GET_PERSISTENT :
2016-10-03 21:36:03 +03:00
keyctl_get_persistent ( tcp , arg2 , arg3 ) ;
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
break ;
2014-02-06 02:41:45 +04:00
2016-10-03 21:35:24 +03:00
case KEYCTL_DH_COMPUTE :
2016-10-03 21:36:03 +03:00
keyctl_dh_compute ( tcp , arg2 , arg3 , arg4 ) ;
2016-10-03 21:35:24 +03:00
return 0 ;
2014-02-06 02:41:45 +04:00
default :
2016-10-03 21:36:03 +03:00
tprintf ( " %#llx, %#llx, %#llx, %#llx " , arg2 , arg3 , arg4 , arg5 ) ;
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
break ;
2014-02-06 02:41:45 +04:00
}
keyctl.c: make use of RVAL_DECODED
* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
(keyctl_join_session_keyring, keyctl_handle_key,
keyctl_set_reqkey_keyring): Remove.
(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
keyctl_setperm_key): Change to return void.
Update for RVAL_DECODED.
(sys_keyctl): Update callers. Update for RVAL_DECODED.
2015-07-20 03:48:49 +03:00
return RVAL_DECODED ;
2014-02-06 02:41:45 +04:00
}