From owner-svn-src-stable@FreeBSD.ORG Sun Jan 30 20:37:43 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EC9E10656B6; Sun, 30 Jan 2011 20:37:43 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F25B48FC25; Sun, 30 Jan 2011 20:37:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0UKbgtm084997; Sun, 30 Jan 2011 20:37:42 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0UKbgtp084995; Sun, 30 Jan 2011 20:37:42 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201101302037.p0UKbgtp084995@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 30 Jan 2011 20:37:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218102 - stable/8/lib/libc/sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jan 2011 20:37:43 -0000 Author: jilles Date: Sun Jan 30 20:37:42 2011 New Revision: 218102 URL: http://svn.freebsd.org/changeset/base/218102 Log: MFC r217704: getgroups(2): Remove and refer to sysconf(3). Because {NGROUPS_MAX} may become variable, its value should be obtained using sysconf(3). In head, r217704 removed mention of ; this was not mentioned in stable/8. Modified: stable/8/lib/libc/sys/getgroups.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/sys/getgroups.2 ============================================================================== --- stable/8/lib/libc/sys/getgroups.2 Sun Jan 30 20:31:43 2011 (r218101) +++ stable/8/lib/libc/sys/getgroups.2 Sun Jan 30 20:37:42 2011 (r218102) @@ -28,7 +28,7 @@ .\" @(#)getgroups.2 8.2 (Berkeley) 4/16/94 .\" $FreeBSD$ .\" -.Dd March 5, 1999 +.Dd January 21, 2011 .Dt GETGROUPS 2 .Os .Sh NAME @@ -37,7 +37,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h .In unistd.h .Ft int .Fn getgroups "int gidsetlen" "gid_t *gidset" @@ -66,6 +65,12 @@ is zero, returns the number of supplementary group IDs associated with the calling process without modifying the array pointed to by .Fa gidset . +.Pp +The value of +.Dv {NGROUPS_MAX} +should be obtained using +.Xr sysconf 3 +to avoid hard-coding it into the executable. .Sh RETURN VALUES A successful call returns the number of groups in the group set. A value of -1 indicates that an error occurred, and the error @@ -88,7 +93,8 @@ an invalid address. .El .Sh SEE ALSO .Xr setgroups 2 , -.Xr initgroups 3 +.Xr initgroups 3 , +.Xr sysconf 3 .Sh STANDARDS The .Fn getgroups