Following the recent performance improvement lib/libc/gen/getgrouplist.c 1.13
i had a closer look at YP group support in 4.4-beta. I suggest to explicitely state in the manual which YP maps are required for proper YP group support. Arguably, this is implementation dependent, and on OpenBSD, all standard maps are built by default. On the other hand, the use of YP is common in multi-OS settings, and i think the following information can really come in handy. Besides, group(5) already talks about one particular YP map, not mentioning that two others are needed as well. This might confuse people. Index: lib/libc/gen/getgrent.3 =================================================================== RCS file: /cvs/src/lib/libc/gen/getgrent.3,v retrieving revision 1.14 diff -u -p -r1.14 getgrent.3 --- lib/libc/gen/getgrent.3 31 May 2007 19:19:28 -0000 1.14 +++ lib/libc/gen/getgrent.3 26 Jul 2008 21:02:57 -0000 @@ -144,6 +144,19 @@ characters in size. .\" .Dv _SC_GETGR_R_SIZE_MAX .\" .Xr sysconf 2 .\" parameter. +.Sh YP SUPPORT +If YP is active, the functions +.Fn getgrent +and +.Fn getgrnam +also use the +.Pa group.byname +YP map and the function +.Fn getgrgid +also uses the +.Pa group.bygid +YP map in addition to the group file, +respecting the order of normal and YP entries in the group file. .Sh RETURN VALUES The functions .Fn getgrent , @@ -175,7 +188,9 @@ group database file .El .Sh SEE ALSO .Xr getpwent 3 , -.Xr group 5 +.Xr group 5 , +.Xr yp 8 , +.Xr ypclnt 3 .Sh HISTORY The functions .Fn endgrent , Index: lib/libc/gen/getgrouplist.3 =================================================================== RCS file: /cvs/src/lib/libc/gen/getgrouplist.3,v retrieving revision 1.10 diff -u -p -r1.10 getgrouplist.3 --- lib/libc/gen/getgrouplist.3 31 May 2007 19:19:28 -0000 1.10 +++ lib/libc/gen/getgrouplist.3 26 Jul 2008 21:02:57 -0000 @@ -48,6 +48,9 @@ The is automatically included in the groups list. Typically this value is given as the group number from the password file. +If YP is active, the +.Pa netid.byname +YP map will be used in addition to the group file. .Pp The resulting group list is returned in the integer array pointed to by .Fa groups . @@ -69,8 +72,11 @@ Here, the group array will be filled wit group database file .El .Sh SEE ALSO +.Xr group 5 , .Xr setgroups 2 , -.Xr initgroups 3 +.Xr initgroups 3 , +.Xr yp 8 , +.Xr yp_match 5 .Sh HISTORY The .Fn getgrouplist Index: share/man/man5/group.5 =================================================================== RCS file: /cvs/src/share/man/man5/group.5,v retrieving revision 1.11 diff -u -p -r1.11 group.5 --- share/man/man5/group.5 31 May 2007 19:19:58 -0000 1.11 +++ share/man/man5/group.5 26 Jul 2008 21:02:57 -0000 @@ -118,6 +118,18 @@ form should be on the last line, for his Only the first group with a specific name encountered, whether in the .Nm file itself, or included via YP, will be used. +.Pp +Proper YP group support requires consistent +.Pa group.byname , +.Pa group.bygid +and +.Pa netid.byname +YP maps. +See +.Xr getgrent 3 +and +.Xr getgrouplist 3 +for details. .Sh FILES .Bl -tag -width /etc/group -compact .It Pa /etc/group