summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Syromyatnikov <evgsyr@gmail.com>2018-10-26 01:46:25 +0200
committerEugene Syromyatnikov <evgsyr@gmail.com>2022-09-02 17:55:13 +0200
commit8ba28faed4cba6ecfb6e9044068836466d35cb1e (patch)
tree32129f6907990d574084cd26e31efc7c4928022a
parentd234e62b545d026d6286defa2ecddc8a773df5d4 (diff)
downloadstrace-8ba28faed4cba6ecfb6e9044068836466d35cb1e.tar.gz
fcntl: decode F_GETOWNER_UIDS
* fcntl.c (print_owner_uids): New function. (print_fcntl) <case F_GETOWNER_UIDS>: Decode command using print_owner_uids.
-rw-r--r--src/fcntl.c22
1 files changed, 22 insertions, 0 deletions
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]);