manual page distributed with 4.1BSD
[unix-history] / usr / src / lib / libc / compat-43 / setreuid.2
CommitLineData
96750fe6
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
5.\" @(#)setreuid.2 4.1 (Berkeley) %G%
6.\"
7.TH SETUID 2
8.UC 4
9.SH NAME
10setuid, setgid \- set user and group ID
11.SH SYNOPSIS
12.B setuid(uid)
13.PP
14.B setgid(gid)
15.SH DESCRIPTION
16The user ID (group ID) of the current process is set to
17the argument.
18Both the effective and the real ID are set.
19These calls are only permitted to the super-user
20or if the argument is the real or effective ID.
21.SH "SEE ALSO"
22getuid(2)
23.SH DIAGNOSTICS
24Zero is returned if the user (group) ID is set;
25\-1 is returned otherwise.
26.SH "ASSEMBLER (PDP-11)"
27(setuid = 23.)
28.br
29(user ID in r0)
30.br
31.B sys setuid
32.PP
33(setgid = 46.)
34.br
35(group ID in r0)
36.br
37.B sys setgid