Two questions answered myself:
kris wrote:
> setgroups(2) and getgroups(2) both mention a limits.h constant called
> NGROUPS_MAX, but if I go looking for it like this
>
> kris_at_oekoalpha /home/kris> grep NGROUPS_MAX /usr/include/limits.h
> #define _POSIX_NGROUPS_MAX 0
>
> I don't find a reasonable number.
That is, because NGROUP_MAX is defined somewhere else and included into
limits.h:
kris_at_oekoalpha /home/kris> cpp | tail
#include <limits.h>
NGROUPS_MAX
^D
# 234 "/usr/include/limits.h"
# 3 ""
32
This is just as documented in group(4).
Another question I was to answer myself:
> I was not aware of the fact that group names can be used in field 4 of the
> group file. The documentation of group(4) only mentions user names. Does
> this really work?
It didn't work for me:
root_at_oekoalpha> cat /etc/group
system:*:0:root,kris,friedel,thomas-c,uwe-h,anjal
daemon:*:1:daemon
[ ... ]
sample:*:30:system,daemon
and later:
kris_at_oekoalpha /home/kris> id
uid=2200(kris) gid=220(tv1_2) groups=0(system),25(ftpadmin),252(kartlib),251(arcinfo),221(webmaster)
I am member of system, but not member of sample.
The one question still open:
> Also, I cannot come up why there should be a limit on the number of users
> per group. What is the limiting factor here?
Kristian
Received on Fri May 19 1995 - 12:34:21 NZST