*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> setgroups (2)              


 setgroups(2)                                                   setgroups(2)

 NAME    [Toc]    [Back]
      setgroups - set group access list

 SYNOPSIS    [Toc]    [Back]
      #include <unistd.h>

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

 DESCRIPTION    [Toc]    [Back]
      setgroups() sets the group access list of the current user process
      according to the array gidset.  The parameter ngroups indicates the
      number of entries in the array and must be no more than NGROUPS_MAX,
      as defined in <limits.h>.

      Only super-user can set new groups by adding to the group access list
      of the current user process; any user can delete groups from it.

 RETURN VALUE    [Toc]    [Back]
      Upon successful completion, setgroups() returns 0; otherwise it
      returns -1 and sets errno to indicate the error.

 ERRORS    [Toc]    [Back]
      setgroups() fails if any of the following conditions are encountered:

           [EPERM]        The caller is not super-user and has attempted to
                          set new groups.

           [EFAULT]       The address specified for gidset is outside the
                          process address space.  The reliable detection of
                          this error is implementation dependent.

           [EINVAL]       ngroups is greater than NGROUPS_MAX or not

           [EINVAL]       An entry in gidset is not a valid group ID.

 AUTHOR    [Toc]    [Back]
      setgroups() was developed by the University of California, Berkeley.

 SEE ALSO    [Toc]    [Back]
      getgroups(2), initgroups(3C).

      setgroups(): AES, SVID3

 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003
[ Back ]
 Similar pages
Name OS Title
getgroups HP-UX get group access list
getgroups NetBSD get group access list
getgroups OpenBSD get group access list
setgroups Tru64 Set the group access list
getgroups FreeBSD get group access list
initgroups IRIX initialize group access list
getgroups IRIX get supplementary group access list IDs
initgroups FreeBSD initialize group access list
getgrouplist NetBSD calculate group access list
getgrouplist OpenBSD calculate group access list
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service