Back to index

glibc  2.9
Defines | Functions
setregid.c File Reference
#include <unistd.h>

Go to the source code of this file.


#define ID_EFFECTIVE   0x01
#define ID_REAL   0x02


int setgidx (int mask, gid_t gid)
int __setregid (gid_t rgid, gid_t egid)

Define Documentation

#define ID_EFFECTIVE   0x01

Definition at line 21 of file setregid.c.

#define ID_REAL   0x02

Definition at line 22 of file setregid.c.

Function Documentation

int __setregid ( gid_t  rgid,
gid_t  egid 

Definition at line 28 of file setregid.c.

  int res;

  if (rgid == egid)
    return setgidx (ID_EFFECTIVE | ID_REAL, egid);

  res = setgidx (ID_REAL, rgid);
  if (res == 0)
    res = setgidx (ID_EFFECTIVE, egid);

  return res;

Here is the call graph for this function:

int setgidx ( int  mask,
gid_t  gid