setreuid man page on Ultrix

Man page or keyword search:  
man Server   3690 pages
apropos Keyword Search (all sections)
Output format
Ultrix logo
[printable version]

setreuid(2)							   setreuid(2)

Name
       setreuid - set real and effective user ID's

Syntax
       setreuid(ruid, euid)
       intruid, euid;

Description
       The real and effective user ID's of the current process are set accord‐
       ing to the arguments.  If ruid or euid is -1, the current uid is filled
       in by the system.

Return Values
       Upon  successful	 completion,  a value of zero (0) is returned.	Other‐
       wise, a value of -1 is returned and errno is set to indicate the error.

Environment
       BSD
       If the process is superuser, or and matches with the real user ID,  the
       effective  user	ID,  or the saved set-user-id (as described in ), then
       the real, effective, and the saved set-user-id are set to  and  respec‐
       tively.

       POSIX
       SYSTEM-FIVE
       When your program is compiled in the POSIX or SYSTEM-FIVE mode, if both
       arguments to are -1, the system call returns a value of -1 and errno is
       set to [EINVAL].

       The following semantics apply when using the function:

       If  the	process	 is the superuser, the real, effective, and saved set-
       user-id (as described in ) are set to and respectively.

       If the process is not the superuser, but the and matches with the  real
       user  ID,  the effective user ID (only in the SYSTEM-FIVE and BSD envi‐
       ronments), or the saved set-user-id, then the effective ID  is  set  to
       The  real user ID and the saved set-user-id are left unchanged.

Diagnostics
       [EPERM]	      The  current  process  is	 not the superuser and the and
		      specified does not match with  the  real	user  ID,  the
		      effective	 user ID (only in SYSTEM-FIVE and BSD environ‐
		      ment), or the saved set-user-id.

See Also
       getuid(2), setregid(2), setuid(3)

								   setreuid(2)
[top]

List of man pages available for Ultrix

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net