Describe special case when gidsetlen == 0.
NGROUPS -> NGROUPS_MAX.
This commit is contained in:
parent
293ba06c9d
commit
2f9562f951
|
@ -30,7 +30,7 @@
|
||||||
.\" SUCH DAMAGE.
|
.\" SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.\" from: @(#)getgroups.2 6.7 (Berkeley) 3/10/91
|
.\" from: @(#)getgroups.2 6.7 (Berkeley) 3/10/91
|
||||||
.\" $Id: getgroups.2,v 1.5 1994/03/29 02:46:29 jtc Exp $
|
.\" $Id: getgroups.2,v 1.6 1994/04/15 22:44:06 jtc Exp $
|
||||||
.\"
|
.\"
|
||||||
.Dd March 10, 1991
|
.Dd March 10, 1991
|
||||||
.Dt GETGROUPS 2
|
.Dt GETGROUPS 2
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
.Fn getgroups "int gidsetlen" "gid_t *gidset"
|
.Fn getgroups "int gidsetlen" "gid_t *gidset"
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
.Fn Getgroups
|
.Fn Getgroups
|
||||||
gets the current group access list of the user process
|
gets the current group access list of the current user process
|
||||||
and stores it in the array
|
and stores it in the array
|
||||||
.Fa gidset .
|
.Fa gidset .
|
||||||
The parameter
|
The parameter
|
||||||
|
@ -57,11 +57,16 @@ indicates the number of entries that may be placed in
|
||||||
returns the actual number of groups returned in
|
returns the actual number of groups returned in
|
||||||
.Fa gidset .
|
.Fa gidset .
|
||||||
No more than
|
No more than
|
||||||
.Dv NGROUPS ,
|
.Dv NGROUPS_MAX
|
||||||
as defined in
|
|
||||||
.Aq Pa sys/param.h ,
|
|
||||||
will ever
|
will ever
|
||||||
be returned.
|
be returned.
|
||||||
|
If
|
||||||
|
.Fa gidsetlen
|
||||||
|
is 0,
|
||||||
|
.Fn getgroups
|
||||||
|
returns the number of groups without modifying the
|
||||||
|
.Fa gidset
|
||||||
|
array.
|
||||||
.Sh RETURN VALUES
|
.Sh RETURN VALUES
|
||||||
A successful call returns the number of groups in the group set.
|
A successful call returns the number of groups in the group set.
|
||||||
A value of -1 indicates that an error occurred, and the error
|
A value of -1 indicates that an error occurred, and the error
|
||||||
|
|
Loading…
Reference in New Issue