NetBSD Problem Report #8706
Received: (qmail 9930 invoked from network); 29 Oct 1999 19:37:14 -0000
Message-Id: <199910291942.PAA20382@ichi.basistech.com>
Date: Fri, 29 Oct 1999 15:42:44 -0400 (EDT)
From: nemo@red-bean.com
Reply-To: nemo@red-bean.com
To: gnats-bugs@gnats.netbsd.org
Subject: inconsistent formatting in id output
X-Send-Pr-Version: 3.95
>Number: 8706
>Category: bin
>Synopsis: formatting of `id' output is inconsistent
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: cgd
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Oct 29 12:39:00 +0000 1999
>Closed-Date: Sat Oct 30 22:29:53 +0000 1999
>Last-Modified: Sat Oct 30 22:30:10 +0000 1999
>Originator:
>Release: 1.4.1
>Organization:
Basis Technology/Red Bean Software/Gratuitous Organization for Gratutious
Software Enhancement
>Environment:
System: NetBSD ichi 1.4.1 NetBSD 1.4.1 (ICHI) #1: Fri Oct 8 14:54:48 EDT 1999 nemo@ichi:/usr/src/sys/arch/i386/compile/ICHI i386
>Description:
There's a comma if you run `id' with no arguments, and no comma otherwise.
>How-To-Repeat:
ichi:~$ id
uid=9006(nemo) gid=101(basis) groups=101(basis), 3001(basisadm)
ichi:~$ id nemo
uid=9006(nemo) gid=101(basis) groups=101(basis) 3001(basisadm)
ichi:~$
^ Note that the comma
appears only when no
username is given.
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: mycroft
State-Changed-When: Fri Oct 29 13:04:52 PDT 1999
State-Changed-Why:
Already fixed.
From: root@ihack.net (Charles M. Hannum)
To: nemo@red-bean.com
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: bin/8706: inconsistent formatting in id output
Date: 29 Oct 1999 16:04:02 -0400
This is already fixed in -current and the 1.4 branch.
From: cgd@netbsd.org (Chris G. Demetriou)
To: nemo@red-bean.com
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: bin/8706: inconsistent formatting in id output
Date: 29 Oct 1999 13:54:27 -0700
This issue has already been fixed in -current and on the 1.4 branch
(and will be fixed in 1.4.2, when that is released).
Based on the log of changes that's gone into 1.4.2, I believe that the
patch to fix it is enclosed below. Please try that patch, then reply
to this message (being sure to cc: gnats-bugs@netbsd.org so the PR
will get a copy of your reply) indicating whether or not it solves the
problem for you.
Index: usr.bin/id/id.c
diff -c usr.bin/id/id.c:1.14 usr.bin/id/id.c:1.15
*** usr.bin/id/id.c:1.14 Sat Dec 19 08:55:21 1998
--- usr.bin/id/id.c Tue Aug 17 10:37:32 1999
***************
*** 239,246 ****
}
if ((ngroups = getgroups(maxgroups, groups)) != NULL) {
for (fmt = " groups=%u", lastid = -1, cnt = 0; cnt < ngroups;
! fmt = ", %u", lastid = id) {
! id = groups[cnt++];
if (lastid == id)
continue;
(void)printf(fmt, id);
--- 239,246 ----
}
if ((ngroups = getgroups(maxgroups, groups)) != NULL) {
for (fmt = " groups=%u", lastid = -1, cnt = 0; cnt < ngroups;
! fmt = ",%u", lastid = id, cnt++) {
! id = groups[cnt];
if (lastid == id)
continue;
(void)printf(fmt, id);
***************
*** 266,280 ****
(void)printf("(%s)", gr->gr_name);
ngroups = maxgroups + 1;
(void) getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups);
! fmt = " groups=%u";
! for (lastid = -1, cnt = 0; cnt < ngroups; ++cnt) {
! if (lastid == (id = groups[cnt]))
continue;
(void)printf(fmt, id);
- fmt = " %u";
if ((gr = getgrgid(id)) != NULL)
(void)printf("(%s)", gr->gr_name);
- lastid = id;
}
(void)printf("\n");
}
--- 266,279 ----
(void)printf("(%s)", gr->gr_name);
ngroups = maxgroups + 1;
(void) getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups);
! for (fmt = " groups=%u", lastid = -1, cnt = 0; cnt < ngroups;
! fmt=",%u", lastid = id, cnt++) {
! id = groups[cnt];
! if (lastid == id)
continue;
(void)printf(fmt, id);
if ((gr = getgrgid(id)) != NULL)
(void)printf("(%s)", gr->gr_name);
}
(void)printf("\n");
}
--
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.
From: cgd@netbsd.org (Chris G. Demetriou)
To: root@ihack.net
Cc: gnats-bugs@gnats.netbsd.org, nemo@red-bean.com
Subject: Re: bin/8706: inconsistent formatting in id output
Date: 29 Oct 1999 14:00:55 -0700
Charles Hannum appears to have written by way of reply:
>From: root@ihack.net (Charles M. Hannum)
>To: nemo@red-bean.com
>Cc: gnats-bugs@gnats.netbsd.org
>Subject: Re: bin/8706: inconsistent formatting in id output
>Date: 29 Oct 1999 16:04:02 -0400
>
> This is already fixed in -current and the 1.4 branch.
While this reply is nice, it doesn't actually much help the submitter
solve their problem, or verify that in the circumstances they've
encountered the problems is fixed. Also, it's not particularly great
"customer support."
See my reply to the PR for what i think is a better reply, and also
see http://www.netbsd.org/developers/PR.html for what I consider a
decent way to handle PRs, even PRs which have already been fixed in
-current or release-branch sources. If the user doesn't get their
problem solved, the PR isn't handled properly.
cgd
--
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.
State-Changed-From-To: closed->feedback
State-Changed-By: cgd
State-Changed-When: Fri Oct 29 14:04:58 PDT 1999
State-Changed-Why:
see discussion above; user wasn't given a fix or an opportunity to confirm
that the problem was gone, so the PR shouldn't have been closed. (or,
if they were given a fix/opportunity, that was not noted in the PR,
and it should have been.)
Responsible-Changed-From-To: bin-bug-people->cgd
Responsible-Changed-By: cgd
Responsible-Changed-When: Fri Oct 29 14:04:58 PDT 1999
Responsible-Changed-Why:
because i'm taking responsibility for making sure this PR gets closed.
From: "Joel N. Weber II" <nemo@red-bean.com>
To: cgd@netbsd.org (Chris G. Demetriou)
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: bin/8706: inconsistent formatting in id output
Date: Sat, 30 Oct 1999 13:11:24 -0400
That does indeed appear to fix the problem.
This issue has already been fixed in -current and on the 1.4 branch
(and will be fixed in 1.4.2, when that is released).
Based on the log of changes that's gone into 1.4.2, I believe that the
patch to fix it is enclosed below. Please try that patch, then reply
to this message (being sure to cc: gnats-bugs@netbsd.org so the PR
will get a copy of your reply) indicating whether or not it solves the
problem for you.
Index: usr.bin/id/id.c
diff -c usr.bin/id/id.c:1.14 usr.bin/id/id.c:1.15
*** usr.bin/id/id.c:1.14 Sat Dec 19 08:55:21 1998
--- usr.bin/id/id.c Tue Aug 17 10:37:32 1999
***************
*** 239,246 ****
}
if ((ngroups = getgroups(maxgroups, groups)) != NULL) {
for (fmt = " groups=%u", lastid = -1, cnt = 0; cnt < ngroups;
! fmt = ", %u", lastid = id) {
! id = groups[cnt++];
if (lastid == id)
continue;
(void)printf(fmt, id);
--- 239,246 ----
}
if ((ngroups = getgroups(maxgroups, groups)) != NULL) {
for (fmt = " groups=%u", lastid = -1, cnt = 0; cnt < ngroups;
! fmt = ",%u", lastid = id, cnt++) {
! id = groups[cnt];
if (lastid == id)
continue;
(void)printf(fmt, id);
***************
*** 266,280 ****
(void)printf("(%s)", gr->gr_name);
ngroups = maxgroups + 1;
(void) getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups);
! fmt = " groups=%u";
! for (lastid = -1, cnt = 0; cnt < ngroups; ++cnt) {
! if (lastid == (id = groups[cnt]))
continue;
(void)printf(fmt, id);
- fmt = " %u";
if ((gr = getgrgid(id)) != NULL)
(void)printf("(%s)", gr->gr_name);
- lastid = id;
}
(void)printf("\n");
}
--- 266,279 ----
(void)printf("(%s)", gr->gr_name);
ngroups = maxgroups + 1;
(void) getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups);
! for (fmt = " groups=%u", lastid = -1, cnt = 0; cnt < ngroups;
! fmt=",%u", lastid = id, cnt++) {
! id = groups[cnt];
! if (lastid == id)
continue;
(void)printf(fmt, id);
if ((gr = getgrgid(id)) != NULL)
(void)printf("(%s)", gr->gr_name);
}
(void)printf("\n");
}
--
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.
State-Changed-From-To: feedback->closed
State-Changed-By: cgd
State-Changed-When: Sat Oct 30 15:29:53 PDT 1999
State-Changed-Why:
submitter reports that patch fixed the problem.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.