fcntl: decode F_GETOWNER_UIDS
* fcntl.c (print_owner_uids): New function. (print_fcntl) <case F_GETOWNER_UIDS>: Decode command using print_owner_uids.
This commit is contained in:
parent
7908a872ba
commit
606a8f39e8
20
fcntl.c
20
fcntl.c
@ -98,6 +98,19 @@ print_rwhint(struct tcb *const tcp, const kernel_ulong_t addr)
|
||||
tprints("]");
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
printuid("[", uids[0]); /* Real */
|
||||
printuid(", ", uids[1]); /* Effective */
|
||||
tprints("]");
|
||||
}
|
||||
|
||||
static int
|
||||
print_fcntl(struct tcb *tcp)
|
||||
{
|
||||
@ -211,6 +224,13 @@ print_fcntl(struct tcb *tcp)
|
||||
return 0;
|
||||
tcp->auxstr = signame(tcp->u_rval);
|
||||
return RVAL_STR;
|
||||
case F_GETOWNER_UIDS:
|
||||
if (entering(tcp)) {
|
||||
tprints(", ");
|
||||
return 0;
|
||||
}
|
||||
print_owner_uids(tcp, tcp->u_arg[2]);
|
||||
break;
|
||||
default:
|
||||
tprintf(", %#" PRI_klx, tcp->u_arg[2]);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user