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

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

setregid(2)

Contents


NAME    [Toc]    [Back]

       setregid - Set the real and effective group ID

SYNOPSIS    [Toc]    [Back]

       #include <unistd.h>

       int setregid(
               gid_t rgid,
               gid_t egid );

STANDARDS    [Toc]    [Back]

       Interfaces  documented  on  this reference page conform to
       industry standards as follows:

       setregid(): XSH4.2, XSH5.0

       Refer to the standards(5) reference page for more information
 about industry standards and associated tags.

PARAMETERS    [Toc]    [Back]

       Specifies the new real group ID.  Specifies the new effective
 group ID.

DESCRIPTION    [Toc]    [Back]

       The setregid() function sets the real group ID of the current
 process to the value specified by the rgid parameter,
       and sets the effective group ID to the value specified  by
       the  egid  parameter. If the value of rgid is -1, the real
       group ID is not changed; if the value of egid is  -1,  the
       effective  group ID is not changed. The real and effective
       group IDs may be set to different values in the same call.

       Unprivileged  users  may  change the effective group ID to
       the real group ID;  only  the  superuser  may  make  other
       changes.

       Any  supplementary group IDs of the calling process remain
       unchanged.

RETURN VALUES    [Toc]    [Back]

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

ERRORS    [Toc]    [Back]

       The setregid() function sets errno to the specified values
       for the following conditions:

       The  value of the rgid or egid parameter is invalid or out
       of range.  The current process  does  not  have  superuser
       privilege  and  a change other than changing the effective
       group ID to the real group ID was specified.

SEE ALSO    [Toc]    [Back]

      
      
       Functions: getgid(2), setgid(2), setreuid(2), setrgid(3)

       Standards: standards(5)



                                                      setregid(2)
[ Back ]
 Similar pages
Name OS Title
setregid FreeBSD set real and effective group ID
setregid OpenBSD set real and effective group IDs
setregid IRIX set real and effective group ID
getgid HP-UX get real user, effective user, real group, and effective group IDs
setregid HP-UX sets the real and effective group IDs
getegid HP-UX get real user, effective user, real group, and effective group IDs
setreuid Linux set real and/or effective user or group ID
getuid HP-UX get real user, effective user, real group, and effective group IDs
setregid NetBSD set real and effective group ID's
getuid IRIX get real user, effective user, real group, and effective group IDs
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service