Subject: Re: kern_prot.c, crcmp()
To: Roland Illig <rillig@NetBSD.org>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 11/03/2005 20:30:07
On Thu, Nov 03, 2005 at 12:08:03PM +0100, Roland Illig wrote:
> Hi,
> 
> the function crcmp() in kern_prot.c still contains a big FIXME comment, 
> indicating that the comparison of group lists may fail even if the group 
> lists are equivalent. Christos has added a function grsortu() that sorts 
> the group lists when they are set using setgroups().
> 
> How can we assure that every group list that is used in the kernel is 
> appropriately sorted? Some kind of check_grsortu() that prints a warning 
> everytime an unsorted group list is found? If this is reasonable, where 
> should that function be called?

There are some good reasons why you might need to have the list unsorted.
Or more particularly in the order of /etc/group, so that if/when the list
gets truncated you have control over what is left.

	David

-- 
David Laight: david@l8s.co.uk