|
|
9a4987 |
From 64d04198d3c64756ae8a51646b6eac3dff419cb6 Mon Sep 17 00:00:00 2001
|
|
|
9a4987 |
From: "Dmitry V. Levin" <ldv@altlinux.org>
|
|
|
9a4987 |
Date: Fri, 17 Jul 2020 08:00:00 +0000
|
|
|
9a4987 |
Subject: [PATCH 126/138] Use PRINT_FIELD_UID instead of printuid where
|
|
|
9a4987 |
appropriate
|
|
|
9a4987 |
|
|
|
9a4987 |
* ipc_msgctl.c: Include "print_fields.h".
|
|
|
9a4987 |
(print_msqid_ds): Use PRINT_FIELD_UID instead of printuid.
|
|
|
9a4987 |
* ipc_shmctl.c: Include "print_fields.h".
|
|
|
9a4987 |
(print_shmid_ds): Use PRINT_FIELD_UID instead of printuid.
|
|
|
9a4987 |
* statx.c (SYS_FUNC(statx)): Use PRINT_FIELD_UID instead of printuid.
|
|
|
9a4987 |
---
|
|
|
9a4987 |
ipc_msgctl.c | 10 +++++-----
|
|
|
9a4987 |
ipc_shmctl.c | 10 +++++-----
|
|
|
9a4987 |
statx.c | 4 ++--
|
|
|
9a4987 |
3 files changed, 12 insertions(+), 12 deletions(-)
|
|
|
9a4987 |
|
|
|
9a4987 |
diff --git a/ipc_msgctl.c b/ipc_msgctl.c
|
|
|
9a4987 |
index 92eda11..920ed72 100644
|
|
|
9a4987 |
--- a/ipc_msgctl.c
|
|
|
9a4987 |
+++ b/ipc_msgctl.c
|
|
|
9a4987 |
@@ -22,6 +22,7 @@ typedef struct NAME_OF_STRUCT_MSQID_DS msqid_ds_t;
|
|
|
9a4987 |
|
|
|
9a4987 |
#include MPERS_DEFS
|
|
|
9a4987 |
|
|
|
9a4987 |
+#include "print_fields.h"
|
|
|
9a4987 |
#include "xlat/msgctl_flags.h"
|
|
|
9a4987 |
|
|
|
9a4987 |
static void
|
|
|
9a4987 |
@@ -37,9 +38,8 @@ print_msqid_ds(struct tcb *const tcp, const kernel_ulong_t addr, int cmd)
|
|
|
9a4987 |
if (umove_or_printaddr(tcp, addr, &msqid_ds))
|
|
|
9a4987 |
return;
|
|
|
9a4987 |
|
|
|
9a4987 |
- tprints("{msg_perm={");
|
|
|
9a4987 |
- printuid("uid=", msqid_ds.msg_perm.uid);
|
|
|
9a4987 |
- printuid(", gid=", msqid_ds.msg_perm.gid);
|
|
|
9a4987 |
+ PRINT_FIELD_UID("{msg_perm={", msqid_ds.msg_perm, uid);
|
|
|
9a4987 |
+ PRINT_FIELD_UID(", ", msqid_ds.msg_perm, gid);
|
|
|
9a4987 |
tprints(", mode=");
|
|
|
9a4987 |
print_numeric_umode_t(msqid_ds.msg_perm.mode);
|
|
|
9a4987 |
|
|
|
9a4987 |
@@ -50,8 +50,8 @@ print_msqid_ds(struct tcb *const tcp, const kernel_ulong_t addr, int cmd)
|
|
|
9a4987 |
|
|
|
9a4987 |
tprintf(", key=%u",
|
|
|
9a4987 |
(unsigned) msqid_ds.msg_perm.NAME_OF_STRUCT_IPC_PERM_KEY);
|
|
|
9a4987 |
- printuid(", cuid=", msqid_ds.msg_perm.cuid);
|
|
|
9a4987 |
- printuid(", cgid=", msqid_ds.msg_perm.cgid);
|
|
|
9a4987 |
+ PRINT_FIELD_UID(", ", msqid_ds.msg_perm, cuid);
|
|
|
9a4987 |
+ PRINT_FIELD_UID(", ", msqid_ds.msg_perm, cgid);
|
|
|
9a4987 |
tprints("}");
|
|
|
9a4987 |
tprintf(", msg_stime=%u", (unsigned) msqid_ds.msg_stime);
|
|
|
9a4987 |
tprintf(", msg_rtime=%u", (unsigned) msqid_ds.msg_rtime);
|
|
|
9a4987 |
diff --git a/ipc_shmctl.c b/ipc_shmctl.c
|
|
|
9a4987 |
index 0fb584e..83e36f3 100644
|
|
|
9a4987 |
--- a/ipc_shmctl.c
|
|
|
9a4987 |
+++ b/ipc_shmctl.c
|
|
|
9a4987 |
@@ -22,6 +22,7 @@ typedef struct NAME_OF_STRUCT_SHMID_DS shmid_ds_t;
|
|
|
9a4987 |
|
|
|
9a4987 |
#include MPERS_DEFS
|
|
|
9a4987 |
|
|
|
9a4987 |
+#include "print_fields.h"
|
|
|
9a4987 |
#include "xlat/shmctl_flags.h"
|
|
|
9a4987 |
|
|
|
9a4987 |
static void
|
|
|
9a4987 |
@@ -37,9 +38,8 @@ print_shmid_ds(struct tcb *const tcp, const kernel_ulong_t addr, int cmd)
|
|
|
9a4987 |
if (umove_or_printaddr(tcp, addr, &shmid_ds))
|
|
|
9a4987 |
return;
|
|
|
9a4987 |
|
|
|
9a4987 |
- tprints("{shm_perm={");
|
|
|
9a4987 |
- printuid("uid=", shmid_ds.shm_perm.uid);
|
|
|
9a4987 |
- printuid(", gid=", shmid_ds.shm_perm.gid);
|
|
|
9a4987 |
+ PRINT_FIELD_UID("{shm_perm={", shmid_ds.shm_perm, uid);
|
|
|
9a4987 |
+ PRINT_FIELD_UID(", ", shmid_ds.shm_perm, gid);
|
|
|
9a4987 |
tprints(", mode=");
|
|
|
9a4987 |
print_numeric_umode_t(shmid_ds.shm_perm.mode);
|
|
|
9a4987 |
|
|
|
9a4987 |
@@ -50,8 +50,8 @@ print_shmid_ds(struct tcb *const tcp, const kernel_ulong_t addr, int cmd)
|
|
|
9a4987 |
|
|
|
9a4987 |
tprintf(", key=%u",
|
|
|
9a4987 |
(unsigned) shmid_ds.shm_perm.NAME_OF_STRUCT_IPC_PERM_KEY);
|
|
|
9a4987 |
- printuid(", cuid=", shmid_ds.shm_perm.cuid);
|
|
|
9a4987 |
- printuid(", cgid=", shmid_ds.shm_perm.cgid);
|
|
|
9a4987 |
+ PRINT_FIELD_UID(", ", shmid_ds.shm_perm, cuid);
|
|
|
9a4987 |
+ PRINT_FIELD_UID(", ", shmid_ds.shm_perm, cgid);
|
|
|
9a4987 |
tprints("}");
|
|
|
9a4987 |
tprintf(", shm_segsz=%u", (unsigned) shmid_ds.shm_segsz);
|
|
|
9a4987 |
tprintf(", shm_cpid=%u", (unsigned) shmid_ds.shm_cpid);
|
|
|
9a4987 |
diff --git a/statx.c b/statx.c
|
|
|
9a4987 |
index 54b6d7c..7b00b8e 100644
|
|
|
9a4987 |
--- a/statx.c
|
|
|
9a4987 |
+++ b/statx.c
|
|
|
9a4987 |
@@ -60,8 +60,8 @@ SYS_FUNC(statx)
|
|
|
9a4987 |
|
|
|
9a4987 |
if (!abbrev(tcp)) {
|
|
|
9a4987 |
PRINT_FIELD_U(", ", stx, stx_nlink);
|
|
|
9a4987 |
- printuid(", stx_uid=", stx.stx_uid);
|
|
|
9a4987 |
- printuid(", stx_gid=", stx.stx_gid);
|
|
|
9a4987 |
+ PRINT_FIELD_UID(", ", stx, stx_uid);
|
|
|
9a4987 |
+ PRINT_FIELD_UID(", ", stx, stx_gid);
|
|
|
9a4987 |
}
|
|
|
9a4987 |
|
|
|
9a4987 |
tprints(", stx_mode=");
|
|
|
9a4987 |
--
|
|
|
9a4987 |
2.1.4
|
|
|
9a4987 |
|