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

  man pages->Tru64 Unix man pages -> setgroups (2)              
Title
Content
Arch
Section
 

setgroups(2)

Contents


NAME    [Toc]    [Back]

       setgroups - Set the group access list

SYNOPSIS    [Toc]    [Back]

       #include <unistd.h> #include <sys/types.h>

       int setgroups(
               int gidsetsize,
               gid_t grouplist[] );

PARAMETERS    [Toc]    [Back]

       Indicates the number of entries in the array pointed to by
       the grouplist parameter. This number must not be more than
       NGROUPS_MAX,  which  is  defined  in the <sys/syslimits.h>
       header file.  Points to the array that contains the  group
       access  list  of  the  current user process. Element grouplist[0]
 becomes the new effective group ID.

DESCRIPTION    [Toc]    [Back]

       The setgroups() function sets the group access list of the
       current  user process according to the array pointed to by
       the grouplist parameter.

       This function fails unless the invoking process has  superuser
 privilege.

RETURN VALUES    [Toc]    [Back]

       Upon  successful  completion,  a  value  of  0  (zero)  is
       returned.  If the setgroups() function fails, a  value  of
       -1 is returned and errno is set to indicate the error.

ERRORS    [Toc]    [Back]

       If the setgroups() function fails, errno may be set to one
       of the following values: The  caller  does  not  have  the
       appropriate system privilege.  The value of the gidsetsize
       parameter is greater than NGROUPS_MAX or an entry  in  the
       grouplist  parameter  is  not a valid group ID.  The grouplist
 parameter points outside of  the  allocated  address
       space of the process.

SEE ALSO    [Toc]    [Back]

      
      
       Functions: getgroups(2), initgroups(3)



                                                     setgroups(2)
[ Back ]
 Similar pages
Name OS Title
getgroups HP-UX get group access list
setgroups OpenBSD set group access list
setgroups IRIX set group access list
getgroups NetBSD get group access list
getgroups OpenBSD get group access list
setgroups NetBSD set group access list
setgroups HP-UX set group access list
getgroups FreeBSD get group access list
setgroups FreeBSD set group access list
initgroups IRIX initialize group access list
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service