|
|
BSD 4.3reno
.\" Copyright (c) 1983 Regents of the University of California. .\" All rights reserved. The Berkeley software License Agreement .\" specifies the terms and conditions for redistribution. .\" .\" @(#)setuid.3 6.3 (Berkeley) 5/12/86 .\" .TH SETUID 3 "May 12, 1986" .UC 5 .SH NAME setuid, seteuid, setruid, setgid, setegid, setrgid \- set user and group ID .SH SYNOPSIS .nf .ft B #include <sys/types.h> .PP .ft B .nf setuid(uid) seteuid(euid) setruid(ruid) uid_t uid, euid, ruid; .PP .ft B .nf setgid(gid) setegid(egid) setrgid(rgid) gid_t gid, egid, rgid; .fi .SH DESCRIPTION .I Setuid .RI ( setgid ) sets both the real and effective user ID (group ID) of the current process to as specified. .PP .I Seteuid .RI ( setegid ) sets the effective user ID (group ID) of the current process. .PP .I Setruid .RI ( setrgid ) sets the real user ID (group ID) of the current process. .PP These calls are only permitted to the super-user or if the argument is the real or effective ID. .SH "SEE ALSO" setreuid(2), setregid(2), getuid(2), getgid(2) .SH DIAGNOSTICS Zero is returned if the user (group) ID is set; \-1 is returned otherwise.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.