Penguin
Blame: setresgid(2)
EditPageHistoryDiffInfoLikePages
Annotated edit history of setresgid(2) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 SETRESUID
2 !!!SETRESUID
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 RETURN VALUE
7 ERRORS
8 CONFORMING TO
9 SEE ALSO
10 ----
11 !!NAME
12
13
14 setresuid, setresgid - set real, effective and saved user or group ID
15 !!SYNOPSIS
16
17
18 __#include __
19
20
21 __int setresuid(uid_t__ ''ruid''__, uid_t__
22 ''euid''__, uid_t__ ''suid''__);
23 int setresgid(gid_t__ ''rgid''__, gid_t__
24 ''egid''__, gid_t__ ''sgid''__);__
25 !!DESCRIPTION
26
27
28 __setresuid__ (introduced in Linux 2.1.44) sets the real
29 user ID, the effective user ID, and the saved set-user-ID of
30 the current process.
31
32
33 Unprivileged user processes (i.e., processes with each of
34 real, effective and saved user ID nonzero) may change the
35 real, effective and saved user ID, each to one of: the
36 current uid, the current effective uid or the current saved
37 uid.
38
39
40 The super-user may set real, effective and saved user ID to
41 arbitrary values.
42
43
44 If one of the parameters equals -1, the corresponding value
45 is not changed.
46
47
48 Completely analogously, __setresgid__ sets the real,
49 effective and saved group ID's of the current process, with
50 the same restrictions for processes with each of real,
51 effective and saved user ID nonzero.
52 !!RETURN VALUE
53
54
55 On success, zero is returned. On error, -1 is returned, and
56 ''errno'' is set appropriately.
57 !!ERRORS
58
59
60 __EPERM__
61
62
63 The current process was not privileged and tried to change
64 the IDs is a not allowed way.
65 !!CONFORMING TO
66
67
68 This call is Linux-specific.
69 !!SEE ALSO
70
71
72 getuid(2), setuid(2), getreuid(2),
73 setreuid(2), getresuid(2)
74 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.