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

  man pages->Tru64 Unix man pages -> setruid (3)              
Title
Content
Arch
Section
 

setruid(3)

Contents


NAME    [Toc]    [Back]

       setruid, seteuid - Set the process's user IDs

SYNOPSIS    [Toc]    [Back]

       #include <unistd.h>

       int setruid(
               uid_t ruid ); int seteuid(
               uid_t euid );

LIBRARY    [Toc]    [Back]

       Standard C Library (libc)

PARAMETERS    [Toc]    [Back]

       Specifies  the  effective  user  ID to set.  Specifies the
       real user ID to set.

DESCRIPTION    [Toc]    [Back]

       The setruid() and seteuid() functions reset the  process's
       real and effective user IDs,  respectively.

       A  process  with the superuser privilege can set either ID
       to any value.  An unprivileged process can  only  set  the
       effective  user  ID  if  the  euid  parameter  is equal to
       either the real, effective, or saved user ID of the   process.
   An  unprivileged  process cannot set the real user
       ID.

RETURN VALUES    [Toc]    [Back]

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

ERRORS    [Toc]    [Back]

       If  the seteuid() or setruid()function fails, errno is set
       to the following value: The euid parameter is   not  equal
       to  either  the  real or saved user IDs of the process and
       the calling process does not have appropriate privilege.

SEE ALSO    [Toc]    [Back]

      
      
       Functions: getuid(2), , setreuid(2).



                                                       setruid(3)
[ Back ]
 Similar pages
Name OS Title
kvm_getenvv OpenBSD access user process state
kvm_getprocs FreeBSD access user process state
kvm_getargv NetBSD access user process state
kvm_getargv FreeBSD access user process state
kvm_getproc2 NetBSD access user process state
kvm_getenvv2 OpenBSD access user process state
kvm_getenvv FreeBSD access user process state
kvm_getargv2 NetBSD access user process state
kvm_getenvv2 NetBSD access user process state
kvm_getargv OpenBSD access user process state
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service