Subject: src/sys/kern/kern_prot.c, function crcmp
To: None <tech-kern@NetBSD.org>
From: Roland Illig <rillig@NetBSD.org>
Date: 08/22/2005 17:17:31
I just fixed a bug in the crcmp function, but I strongly believe there's
another one. That's why I have put the big FIXME comment into it.
As I am completely new to the kernel code, I can tell neither under
which exact circumstances the function is called nor if the memcpy() is
sufficient for comparing the group lists.
If it is sufficient, could someone please replace my FIXME comment with
a comment that explains _why_ it is sufficient?
If it is not sufficient we need a simple and fast algorithm to compare
the two group lists, maybe including the primary egid of each list. As
the function is currently only used in one place (vfs_subr.c), even a
simpler algorithm might do the job. Do we really need to know if both
lists are equal or does it suffice if one list is a sublist of the other?