Subject: CVS commit: src/usr.bin/id
To: None <source-changes@NetBSD.org>
From: Matthias Drochner <drochner@netbsd.org>
List: source-changes
Date: 08/30/2005 16:47:47
Module Name:	src
Committed By:	drochner
Date:		Tue Aug 30 16:47:47 UTC 2005

Modified Files:
	src/usr.bin/id: id.c

Log Message:
id(1) didn't check the return value of getgrouplist(3) and used memory
outside the group array in the case that a user is member of more than
_SC_NGROUPS_MAX groups.
(This is probably also the problem behind PR bin/31069 by Zafer Aydogan.)
So check the return value and retry with sufficiently allocated memory
in case the initial _SC_NGROUPS_MAX groups are not enough.


To generate a diff of this commit:
cvs rdiff -r1.24 -r1.25 src/usr.bin/id/id.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.