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

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

setreuid(2)

Contents


NAME    [Toc]    [Back]

       setreuid - Set real and effective user IDs

SYNOPSIS    [Toc]    [Back]

       #include <unistd.h>

       int setreuid(
               uid_t ruid,
               uid_t euid );

STANDARDS    [Toc]    [Back]

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

       setreuid(): 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 user ID.  Specifies the new effective
 user ID.

DESCRIPTION    [Toc]    [Back]

       The setreuid() function sets the real and  effective  user
       IDs  of the current process to the values specified by the
       ruid and euid parameters. If ruid or euid is -1, the  corresponding
  effective  or real user ID of the current process
 is not changed.

       Users may change the effective user ID to  the  real  user
       ID; only processes with superuser privilege may make other
       changes.  This task  is  normally  done  by  the  system's
       authentication  program  (for  example, login), but is not
       done for system daemons.

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 setreuid() function sets errno to the specified values
       for  the  following  conditions:  The value of the ruid or
       euid parameter is invalid or out of  range.   The  current
       process  is  not  the  superuser  and  a change other than
       changing the effective user ID to the  real  user  ID  was
       specified.

SEE ALSO    [Toc]    [Back]

      
      
       Functions: getuid(2), setgid(2), setregid(2), setruid(3)

       Standards: standards(5)



                                                      setreuid(2)
[ Back ]
 Similar pages
Name OS Title
geteuid Tru64 Get the real or effective user ID
getuid Tru64 Get the real or effective user ID
setreuid NetBSD set real and effective user ID's
getuid IRIX get real user, effective user, real group, and effective group IDs
setreuid IRIX set real and effective user ID's
setreuid FreeBSD set real and effective user ID's
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
geteuid HP-UX get real user, effective user, real group, and effective group IDs
getgid HP-UX get real user, effective user, real group, and effective group IDs
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service