Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ setgroups(2) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getgroups

initgroups



SETGROUPS(2,L)              AIX Technical Reference              SETGROUPS(2,L)



-------------------------------------------------------------------------------
setgroups



PURPOSE

Sets the group access list.

SYNTAX

#include <grp.h>

int setgroups (ngroups, gidset);
int ngroups, *gidset;

DESCRIPTION

The setgroups system call sets the group access list of the current user
process according to the array pointed to by the gidset parameter.  The ngroups
parameter indicates the number of entries in the array and must not be more
than NGROUPS, as defined in the grp.h header file.  Only a process with an
effective user ID of superuser can set new groups.

RETURN VALUE

Upon successful completion, a value of 0 is returned.  If the setgroups system
call fails, a value of -1 is returned and errno is set to indicate the error.

ERROR CONDITIONS

The setgroups system call fails if one or more of the following is true:

EPERM   The effective user ID of the calling process is not superuser.

EINVAL  The value of the ngroups parameter is greater than NGROUPS.

EFAULT  The gidset parameter points to a location outside of the process's
        allocated address space.

RELATED INFORMATION

In this book:  "getgroups" and "initgroups."












Processed November 7, 1990      SETGROUPS(2,L)                                1



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026