Date: Thu, 17 May 2001 22:26:35 -0700 From: Dima Dorfman <dima@unixfreak.org> To: audit@freebsd.org Subject: Short patch to id(1) Message-ID: <20010518052635.2DE963E28@bazooka.unixfreak.org>
next in thread | raw e-mail | index | archive | help
Hi folks,
Please review the attached short patch to id(1) to fix a minor
cosmetic bug; id(1) will separate the list of groups with commas
*only* if it is not invoked with a username as an argument as
demonstrated here:
dima@sungold% id
uid=1003(dima) gid=100(users) groups=100(users), 0(wheel), 101(dns)
dima@sungold% id dima
uid=1003(dima) gid=100(users) groups=100(users) 0(wheel) 101(dns)
I believe the correct behavior is to use commas in both cases. This
is consistent with both NetBSD and OpenBSD.
Thanks,
Dima Dorfman
dima@unixfreak.org
Index: id.c
===================================================================
RCS file: /st/src/FreeBSD/src/usr.bin/id/id.c,v
retrieving revision 1.12
diff -u -r1.12 id.c
--- id.c 1999/09/06 20:07:12 1.12
+++ id.c 2001/05/18 05:25:06
@@ -259,7 +259,7 @@
if (lastgid == (gid = groups[cnt]))
continue;
(void)printf(fmt, gid);
- fmt = " %u";
+ fmt = ", %u";
if ((gr = getgrgid(gid)))
(void)printf("(%s)", gr->gr_name);
lastgid = gid;
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010518052635.2DE963E28>
