From 8ba28faed4cba6ecfb6e9044068836466d35cb1e Mon Sep 17 00:00:00 2001 From: Eugene Syromyatnikov Date: Fri, 26 Oct 2018 01:46:25 +0200 Subject: fcntl: decode F_GETOWNER_UIDS * fcntl.c (print_owner_uids): New function. (print_fcntl) : Decode command using print_owner_uids. --- src/fcntl.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/fcntl.c b/src/fcntl.c index b60d9e8b4..333a6b598 100644 --- a/src/fcntl.c +++ b/src/fcntl.c @@ -98,6 +98,21 @@ print_f_owner_ex(struct tcb *const tcp, const kernel_ulong_t addr) tprint_struct_end(); } +static void +print_owner_uids(struct tcb *const tcp, const kernel_ulong_t addr) +{ + uint32_t uids[2]; + + if (umove_or_printaddr(tcp, addr, uids)) + return; + + tprint_array_begin(); + printuid(uids[0]); /* Real */ + tprint_array_next(); + printuid(uids[1]); /* Effective */ + tprint_array_end(); +} + static int print_fcntl(struct tcb *tcp) { @@ -205,6 +220,13 @@ print_fcntl(struct tcb *tcp) return 0; tcp->auxstr = signame(tcp->u_rval); return RVAL_STR; + case F_GETOWNER_UIDS: + if (entering(tcp)) { + tprint_arg_next(); + return 0; + } + print_owner_uids(tcp, tcp->u_arg[2]); + break; default: tprint_arg_next(); PRINT_VAL_X(tcp->u_arg[2]); -- cgit v1.2.1