GNU bug report logs - #7320
'group' command gives wrong/extra group

Previous Next

Package: coreutils;

Reported by: owen <at> illinois.edu

Date: Tue, 2 Nov 2010 21:41:01 UTC

Severity: normal

Tags: fixed

Fixed in version 8.18

Done: Jim Meyering <meyering <at> hx.meyering.net>

Bug is archived. No further changes may be made.

Full log


Message #35 received at 7320 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: "Marc W. Mengel" <mengel <at> fnal.gov>
Cc: owen <at> illinois.edu, 7320 <at> debbugs.gnu.org
Subject: Re: bug#7320: id and groups may lie
Date: Fri, 27 Apr 2012 19:53:53 +0200
Jim Meyering wrote:

> Jim Meyering wrote:
>
>> Marc W. Mengel wrote:
>>> The other test case is to make a copy of "id" and make it
>>> setuid to some user (i.e. mysql) and run it; it will show
>>> itself as having mysql's primary group, even though it doesn't.
>>
>> Oh!  Yes, that will work.  Thanks.
>> With that, I'll add a test like this:
>>
>> New:
>>     $ sudo src/setuidgid -g 3 root src/id -G
>>     3
>>
>> Old:
>>     $ sudo src/setuidgid -g 3 root id -G
>>     3 0
>
> Here's the new test that I'll merge into the actual fix:
>
>>From d11303c1e643d31aea70e15f79ecf8b55038446a Mon Sep 17 00:00:00 2001
> From: Jim Meyering <meyering <at> redhat.com>
> Date: Fri, 27 Apr 2012 18:44:08 +0200
> Subject: [PATCH] tests: add a test for the just-fixed id/groups bug
>
> * tests/misc/id-setgid: New file.
> * tests/Makefile.am (TESTS): Add it.
> ---
>  tests/Makefile.am    |    1 +
>  tests/misc/id-setgid |   34 ++++++++++++++++++++++++++++++++++

Nearly missed it.  I'd added a new root-only test
without listing it in the root_tests list.
Once we depend on GNU make, we should be able to automate this.

Folding this in:

From 7418ab4c137d5fb608ea9cd974aabf5f6a76445e Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering <at> redhat.com>
Date: Fri, 27 Apr 2012 19:51:54 +0200
Subject: [PATCH] tests: fix syntax-check failure

* tests/Makefile.am (root_tests): It's a root-only test,
so add it here, too.
---
 tests/Makefile.am |    1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index cd1fc5c..72717e3 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -36,6 +36,7 @@ root_tests =					\
   ls/nameless-uid				\
   misc/chcon					\
   misc/chroot-credentials			\
+  misc/id-setgid				\
   misc/selinux					\
   misc/truncate-owned-by-other			\
   mkdir/writable-under-readonly			\
--
1.7.10.365.g7cacb




This bug report was last modified 10 years and 331 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.