Util-Linux package development
 help / color / mirror / Atom feed
* [PATCH] ipcs: show gid instead of uid
@ 2016-02-22  5:10 Hushan Jia
  2016-02-22  9:00 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Hushan Jia @ 2016-02-22  5:10 UTC (permalink / raw)
  To: util-linux; +Cc: hushan.jia

From: Hushan Jia <hushan.jia@gmail.com>

ipcs -i incorrectly used uid where it should be gid

Signed-off-by: Hushan Jia <hushan.jia@gmail.com>
---
 sys-utils/ipcs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys-utils/ipcs.c b/sys-utils/ipcs.c
index eaab922..5877c46 100644
--- a/sys-utils/ipcs.c
+++ b/sys-utils/ipcs.c
@@ -572,7 +572,7 @@ static void print_shm(int shmid, int unit)
 
 	printf(_("\nShared memory Segment shmid=%d\n"), shmid);
 	printf(_("uid=%u\tgid=%u\tcuid=%u\tcgid=%u\n"),
-	       shmdata->shm_perm.uid, shmdata->shm_perm.uid,
+	       shmdata->shm_perm.uid, shmdata->shm_perm.gid,
 	       shmdata->shm_perm.cuid, shmdata->shm_perm.cgid);
 	printf(_("mode=%#o\taccess_perms=%#o\n"), shmdata->shm_perm.mode,
 	       shmdata->shm_perm.mode & 0777);
@@ -602,7 +602,7 @@ void print_msg(int msgid, int unit)
 
 	printf(_("\nMessage Queue msqid=%d\n"), msgid);
 	printf(_("uid=%u\tgid=%u\tcuid=%u\tcgid=%u\tmode=%#o\n"),
-	       msgdata->msg_perm.uid, msgdata->msg_perm.uid,
+	       msgdata->msg_perm.uid, msgdata->msg_perm.gid,
 	       msgdata->msg_perm.cuid, msgdata->msg_perm.cgid,
 	       msgdata->msg_perm.mode);
 	ipc_print_size(unit, unit == IPC_UNIT_HUMAN ? _("csize=") : _("cbytes="),
@@ -635,7 +635,7 @@ static void print_sem(int semid)
 
 	printf(_("\nSemaphore Array semid=%d\n"), semid);
 	printf(_("uid=%u\t gid=%u\t cuid=%u\t cgid=%u\n"),
-	       semdata->sem_perm.uid, semdata->sem_perm.uid,
+	       semdata->sem_perm.uid, semdata->sem_perm.gid,
 	       semdata->sem_perm.cuid, semdata->sem_perm.cgid);
 	printf(_("mode=%#o, access_perms=%#o\n"),
 	       semdata->sem_perm.mode, semdata->sem_perm.mode & 0777);
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ipcs: show gid instead of uid
  2016-02-22  5:10 [PATCH] ipcs: show gid instead of uid Hushan Jia
@ 2016-02-22  9:00 ` Karel Zak
  0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2016-02-22  9:00 UTC (permalink / raw)
  To: Hushan Jia; +Cc: util-linux

On Sun, Feb 21, 2016 at 09:10:24PM -0800, Hushan Jia wrote:
> ipcs -i incorrectly used uid where it should be gid

Applied, thanks. This is pretty stupid bug.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-22  9:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-22  5:10 [PATCH] ipcs: show gid instead of uid Hushan Jia
2016-02-22  9:00 ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox