-.\" $OpenBSD: getgrent.3,v 1.14 2007/05/31 19:19:28 jmc Exp $
+.\" $OpenBSD: getgrent.3,v 1.15 2008/07/28 16:27:39 deraadt Exp $
.\"
.\" Copyright (c) 1989, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: July 28 2008 $
.Dt GETGRENT 3
.Os
.Sh NAME
.\" .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 ,
.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 ,
-.\" $OpenBSD: getgrouplist.3,v 1.10 2007/05/31 19:19:28 jmc Exp $
+.\" $OpenBSD: getgrouplist.3,v 1.11 2008/07/28 16:27:39 deraadt Exp $
.\"
.\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: July 28 2008 $
.Dt GETGROUPLIST 3
.Os
.Sh NAME
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 .
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
-.\" $OpenBSD: group.5,v 1.11 2007/05/31 19:19:58 jmc Exp $
+.\" $OpenBSD: group.5,v 1.12 2008/07/28 16:27:39 deraadt Exp $
.\" $NetBSD: group.5,v 1.4 1995/07/28 06:41:39 phil Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
.\"
.\" @(#)group.5 8.3 (Berkeley) 4/19/94
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: July 28 2008 $
.Dt GROUP 5
.Os
.Sh NAME
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