int sys_setreuid(struct tcb *tcp) { if (entering(tcp)) { printuid("", tcp->u_arg[0]); printuid(", ", tcp->u_arg[1]); } return 0; }
int sys_fchown(struct tcb *tcp) { if (entering(tcp)) { printfd(tcp, tcp->u_arg[0]); printuid(", ", tcp->u_arg[1]); printuid(", ", tcp->u_arg[2]); } return 0; }
static bool print_gid(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) { printuid("", (*(uid_t *) elem_buf)); return true; }
static void print_msqid_ds(struct tcb *tcp, const long addr, int cmd) { /* TODO: We don't properly decode old compat ipc calls. */ if (cmd & IPC_64) cmd &= ~IPC_64; msqid_ds_t msqid_ds; switch (cmd) { case IPC_SET: case IPC_STAT: if (umove_or_printaddr(tcp, addr, &msqid_ds)) return; tprints("{msg_perm={"); printuid("uid=", msqid_ds.msg_perm.uid); printuid(", gid=", msqid_ds.msg_perm.gid); tprints(", mode="); tprints(sprintmode(msqid_ds.msg_perm.mode)); if (cmd != IPC_STAT) { tprints("}, ...}"); break; } tprintf(", key=%u", (unsigned) msqid_ds.msg_perm.__key); printuid(", cuid=", msqid_ds.msg_perm.cuid); printuid(", cgid=", msqid_ds.msg_perm.cgid); tprints("}"); tprintf(", msg_stime=%u", (unsigned) msqid_ds.msg_stime); tprintf(", msg_rtime=%u", (unsigned) msqid_ds.msg_rtime); tprintf(", msg_ctime=%u", (unsigned) msqid_ds.msg_ctime); tprintf(", msg_qnum=%u", (unsigned) msqid_ds.msg_qnum); tprintf(", msg_qbytes=%u", (unsigned) msqid_ds.msg_qbytes); tprintf(", msg_lspid=%u", (unsigned) msqid_ds.msg_lspid); tprintf(", msg_lrpid=%u", (unsigned) msqid_ds.msg_lrpid); tprints("}"); break; default: printaddr(addr); break; } }
static void get_print_uid(struct tcb *const tcp, const char *const prefix, const kernel_ulong_t addr) { uid_t uid; tprints(prefix); if (!umove_or_printaddr(tcp, addr, &uid)) { printuid("[", uid); tprints("]"); } }