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

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

SETRUID(3)

Contents


NAME    [Toc]    [Back]

     setruid, setrgid - set user and group ID

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

     #include <sys/types.h>

     int
     setruid(uid_t ruid);

     int
     setrgid(gid_t rgid);

DESCRIPTION    [Toc]    [Back]

     The setruid() function (setrgid()) sets the real user ID (group ID) of
     the current process.

RETURN VALUES    [Toc]    [Back]

     Upon success, these functions return 0; otherwise -1 is returned.

     If the user is not the super user, or the uid specified is not the real
     or effective ID, these functions return -1.

     The use of these calls is not portable.  Their use is discouraged; they
     will be removed in the future.

SEE ALSO    [Toc]    [Back]

      
      
     getgid(2), getuid(2), setegid(2), seteuid(2), setgid(2), setuid(2)

HISTORY    [Toc]    [Back]

     The setruid() and setrgid() syscalls appeared in 4.2BSD and were dropped
     in 4.4BSD.

BSD                              June 2, 1993                              BSD
[ Back ]
 Similar pages
Name OS Title
setuid IRIX set user and group IDs
setgid HP-UX set user and group IDs
seteuid IRIX set user and group IDs
setuid HP-UX set user and group IDs
group Linux user group file
adduser Linux add a user or group to the system
id IRIX print the user name and ID, and group name and ID
seteuid Linux set effective user or group ID
cd_idmap Tru64 sets or gets mappings of User and Group IDs on
getegid HP-UX get real user, effective user, real group, and effective group IDs
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service