2014-02-06 02:41:45 +04:00
# include "defs.h"
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
static void
print_keyring_serial_number ( key_serial_t id )
{
const char * str = xlookup ( key_spec , id ) ;
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
2014-02-06 02:41:45 +04:00
keyctl_update_key ( struct tcb * tcp , key_serial_t id , long addr , long 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 ( id ) ;
tprints ( " , " ) ;
printstr ( tcp , addr , len ) ;
tprintf ( " , %lu " , 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
2014-02-06 02:41:45 +04:00
keyctl_read_key ( struct tcb * tcp , key_serial_t id , long addr , long len )
{
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 {
long rval = tcp - > u_rval > len ?
len : ( tcp - > u_rval ? - 1 : 0 ) ;
printstr ( tcp , addr , rval ) ;
}
tprintf ( " , %lu " , 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
static void
2014-02-06 02:41:45 +04:00
keyctl_keyring_search ( struct tcb * tcp , key_serial_t id1 , long addr1 ,
long addr2 , 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 ( " , " ) ;
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
2014-02-06 02:41:45 +04:00
keyctl_chown_key ( struct tcb * tcp , key_serial_t id , int user , int group )
{
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, %d " , user , 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
2014-02-06 02:41:45 +04:00
keyctl_instantiate_key ( struct tcb * tcp , key_serial_t id1 , long addr ,
long len , 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 ( " , " ) ;
printstr ( tcp , addr , len ) ;
tprintf ( " , %lu, " , len ) ;
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 ,
long addr , long len , 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 ( " , " ) ;
tprint_iov ( tcp , len , addr , 1 ) ;
tprintf ( " , %lu, " , len ) ;
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 )
{
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, %u, " , timeout , error ) ;
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
2014-02-06 02:41:45 +04:00
keyctl_get_persistent ( struct tcb * tcp , int uid , key_serial_t id )
{
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
tprintf ( " %d, " , uid ) ;
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
}
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 ] ;
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_??? " ) ;
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
tprints ( " , " ) ;
}
2014-02-06 02:41:45 +04:00
switch ( cmd ) {
case KEYCTL_GET_KEYRING_ID :
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
keyctl_get_keyring_id ( tcp , tcp - > u_arg [ 1 ] , tcp - > u_arg [ 2 ] ) ;
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_JOIN_SESSION_KEYRING :
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
printstr ( tcp , tcp - > u_arg [ 1 ] , - 1 ) ;
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_UPDATE :
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
keyctl_update_key ( tcp , tcp - > u_arg [ 1 ] ,
tcp - > u_arg [ 2 ] , tcp - > u_arg [ 3 ] ) ;
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_REVOKE :
case KEYCTL_CLEAR :
case KEYCTL_INVALIDATE :
case KEYCTL_ASSUME_AUTHORITY :
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 ( tcp - > u_arg [ 1 ] ) ;
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_LINK :
case KEYCTL_UNLINK :
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
keyctl_handle_key_key ( tcp , tcp - > u_arg [ 1 ] , tcp - > u_arg [ 2 ] ) ;
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_DESCRIBE :
case KEYCTL_READ :
case KEYCTL_GET_SECURITY :
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
keyctl_read_key ( tcp , tcp - > u_arg [ 1 ] ,
tcp - > u_arg [ 2 ] , tcp - > u_arg [ 3 ] ) ;
return 0 ;
2014-02-06 02:41:45 +04:00
case KEYCTL_SEARCH :
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
keyctl_keyring_search ( tcp , tcp - > u_arg [ 1 ] , tcp - > u_arg [ 2 ] ,
tcp - > u_arg [ 3 ] , tcp - > u_arg [ 4 ] ) ;
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_CHOWN :
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
keyctl_chown_key ( tcp , tcp - > u_arg [ 1 ] ,
tcp - > u_arg [ 2 ] , tcp - > u_arg [ 3 ] ) ;
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_SETPERM :
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
keyctl_setperm_key ( tcp , tcp - > u_arg [ 1 ] , tcp - > u_arg [ 2 ] ) ;
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_INSTANTIATE :
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
keyctl_instantiate_key ( tcp , tcp - > u_arg [ 1 ] , tcp - > u_arg [ 2 ] ,
tcp - > u_arg [ 3 ] , tcp - > u_arg [ 4 ] ) ;
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_NEGATE :
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
keyctl_negate_key ( tcp , tcp - > u_arg [ 1 ] ,
tcp - > u_arg [ 2 ] , tcp - > u_arg [ 3 ] ) ;
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_SET_REQKEY_KEYRING :
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
printxval ( key_reqkeys , tcp - > u_arg [ 1 ] , " KEY_REQKEY_DEFL_??? " ) ;
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_SET_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
keyctl_set_timeout ( tcp , tcp - > u_arg [ 1 ] , tcp - > u_arg [ 2 ] ) ;
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 :
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
keyctl_reject_key ( tcp , tcp - > u_arg [ 1 ] , tcp - > u_arg [ 2 ] ,
tcp - > u_arg [ 3 ] , tcp - > u_arg [ 4 ] ) ;
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_INSTANTIATE_IOV :
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
keyctl_instantiate_key_iov ( tcp , tcp - > u_arg [ 1 ] ,
tcp - > u_arg [ 2 ] , tcp - > u_arg [ 3 ] ,
tcp - > u_arg [ 4 ] ) ;
break ;
2014-02-06 02:41:45 +04:00
case KEYCTL_GET_PERSISTENT :
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
keyctl_get_persistent ( tcp , tcp - > u_arg [ 1 ] , tcp - > u_arg [ 2 ] ) ;
break ;
2014-02-06 02:41:45 +04:00
default :
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
tprintf ( " %#lx, %#lx, %#lx, %#lx " ,
tcp - > u_arg [ 1 ] , tcp - > u_arg [ 2 ] ,
tcp - > u_arg [ 3 ] , tcp - > u_arg [ 4 ] ) ;
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
}