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

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

setgid(2)

Contents


NAME    [Toc]    [Back]

       setgid - Set the group ID

SYNOPSIS    [Toc]    [Back]

       #include <unistd.h>

       int setgid(
               gid_t group_id );

       Application  developers  may  want  to specify an #include
       statement for <sys/types.h> before the one for  <unistd.h>
       if  programs  are  being developed for multiple platforms.
       The additional #include statement is not required on Tru64
       UNIX  systems  or  by  ISO or X/Open standards, but may be
       required on other vendors' systems that conform  to  these
       standards.

STANDARDS    [Toc]    [Back]

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

       setgid(): POSIX.1, XSH4.0, 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 group ID.

DESCRIPTION    [Toc]    [Back]

       The  setgid()  function  sets the real group ID, effective
       group ID, and the saved set group ID to the  value  specified
 by the group_id parameter.

       If  the process does not have superuser privilege, but the
       group_id parameter is equal to the real group  ID  or  the
       saved  set group ID, the setgid() function sets the effective
 group ID to group_id. The real group ID and saved set
       group ID remain unchanged.

       Any  supplementary group IDs of the calling process remain
       unchanged.

RETURN VALUES    [Toc]    [Back]

       Upon successful completion, the setgid() function  returns
       0  (zero).  Otherwise,  the  function  returns -1 and sets
       errno to indicate the error.

ERRORS    [Toc]    [Back]

       The setgid() function sets errno to the  specified  values
       for  the  following  conditions: The value of the group_id
       parameter is invalid.  The process does not have superuser
       privilege  and  the  group_id parameter does not match the
       real group ID or the saved set group ID.








SEE ALSO    [Toc]    [Back]

      
      
       Functions: exec(2), getgid(2), setuid(2)

       Standards: standards(5)



                                                        setgid(2)
[ Back ]
 Similar pages
Name OS Title
vgrestore HP-UX restore a VxVM disk group back to an LVM volume group
rpccp_remove_group HP-UX Removes all group members and the group from the specified name service entry
TP_CertRevoke Tru64 Determine if the revoking certificate group can revoke the subject certificate group (CDSA)
CSSM_TP_CertRevoke Tru64 Determine if the revoking certificate group can revoke the subject certificate group (CDSA)
ftpgroups HP-UX group password file for use with the SITE GROUP and SITE GPASS commands.
CSSM_TP_CertRemoveFromCrlTemplate Tru64 Determine if the revoking certificate group can remove the subject certificate group from the CRL te...
TP_CertRemoveFromCrlTemplate Tru64 Determine if the revoking certificate group can remove the subject certificate group from the CRL te...
pxfgetgrnam IRIX Gets group information using the group name
pxfgetgrgid IRIX Gets group information using the group ID
groupmember FreeBSD checks group set for a group ID
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service