Back to index

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

Go to the source code of this file.


#define ID_EFFECTIVE   0x01
#define ID_REAL   0x02


int setuidx (int mask, uid_t uid)
int __setreuid (uid_t ruid, uid_t euid)

Define Documentation

#define ID_EFFECTIVE   0x01

Definition at line 21 of file setreuid.c.

#define ID_REAL   0x02

Definition at line 22 of file setreuid.c.

Function Documentation

int __setreuid ( uid_t  ruid,
uid_t  euid 

Definition at line 28 of file setreuid.c.

  int res;

  if (ruid == euid)
    return setuidx (ID_EFFECTIVE | ID_REAL, euid);

  res = setuidx (ID_REAL, ruid);
  if (res == 0)
    res = setuidx (ID_EFFECTIVE, euid);

  return res;

Here is the call graph for this function:

int setuidx ( int  mask,
uid_t  uid