.TH GETGROUPS 2 .UC 4 .SH NAME getgroups, setgroups \- get/set groups .SH SYNOPSIS .nf .B #include .B #include .B int getgroups (int len, gid_t *groups); .B int setgroups (int len, const gid_t *groups); .fi .SH DESCRIPTION .B getgroups() and .B setgroups() get and set suplementary group ID's respecitvely. The parameters are .I len, length of the array, and .I groups, an array of .B gid_t's. .PP .B setgroups() returns 0 on success, a negative value on failure. .PP .B getgroups() returns the number of groups on success, a negative value on failure. .SH ERRORS .B -EINVAL is returned when .I len is not large enough. .PP .B -EPERM is returned when a non-superuser tries to .B setgroups(). .PP .SH FILES /usr/include/linux/sys.h .br /usr/include/unistd.h .SH SEE ALSO setgid(2) .SH BUGS .B setgroups() fails silently when .I len > .B NRGROUPS, which is defined as 32 in param.h.