> Thanks for the report.
>
> I can't reproduce that on a Solaris 9 system.
> Would you please send me the output from running those programs
> via truss?
gnu-id.out - GNU id truss output
solaris-groups.out - Solaris groups truss output
solaris-groups-apptrace.out - Solaris groups apptrace output
Our NSS-LDAP backend does not implement setgrent(), getgrent(), or
endgrent().
Looking at the apptrace output, Solaris groups uses
_getgroupsbymember().
The comments in /usr/include/nss_dbdefs.h mention that
_getgroupsbymember() is part of the frontend for the "group" database
and that it's a more efficient method of getgrent_r() since actually
enumerating large databases would be extremely slow.
_getgroupsbymember() allows the backend database to optimize the query
since it knows what you are trying to do.