Subject: bin/33054: id(1) sometimes report a duplicate group without specified user
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <njoly@pasteur.fr>
List: netbsd-bugs
Date: 03/11/2006 00:25:01
>Number: 33054
>Category: bin
>Synopsis: id(1) sometimes report a duplicate group without specified user
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Mar 11 00:25:00 +0000 2006
>Originator: Nicolas Joly
>Release: NetBSD 3.99.16
>Organization:
Institut Pasteur, Paris.
>Environment:
System: NetBSD cixy.dial.pasteur.fr 3.99.16 NetBSD 3.99.16 (CIXY) #8: Thu Mar 9 23:01:17 CET 2006 njoly@cixy.dial.pasteur.fr:/local/src/NetBSD/obj/i386/sys/arch/i386/compile/CIXY i386
Architecture: i386
Machine: i386
>Description:
id(1) sometimes return a duplicate group (primary one) when called with `-G'
flag and without a specified user.
njoly@cixy [~]> id
uid=1000(njoly) gid=100(users) groups=0(wheel),5(operator),100(users)
root@cixy [~]# id njoly
uid=1000(njoly) gid=100(users) groups=100(users),0(wheel),5(operator)
njoly@cixy [~]> id -Gn
users wheel operator users
njoly@cixy [~]> id -Gn njoly
users wheel operator
Some other cases does not seems to be affected :
root@cixy [~]# id
uid=0(root) gid=0(wheel) groups=0(wheel),2(kmem),3(sys),4(tty),5(operator),20(staff),31(guest)
root@cixy [~]# id root
uid=0(root) gid=0(wheel) groups=0(wheel),2(kmem),3(sys),4(tty),5(operator),20(staff),31(guest)
root@cixy [~]# id -Gn
wheel kmem sys tty operator staff guest
root@cixy [~]# id -Gn root
wheel kmem sys tty operator staff guest
The groups order is not really important (except for consistency), but the
duplicate groups are more annoying.
>How-To-Repeat:
check `id -Gn' vs. `id -Gn <user>' output.
>Fix:
don't know