Penguin
Annotated edit history of setegid(2) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 SETEUID
2 !!!SETEUID
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 RETURN VALUE
7 ERRORS
8 NOTES
9 CONFORMING TO
10 SEE ALSO
11 ----
12 !!NAME
13
14
15 seteuid, setegid - set effective user or group ID
16 !!SYNOPSIS
17
18
19 __#include __
20 #include __
21
22
23 __int seteuid(uid_t__ ''euid''__);
24 int setegid(gid_t__ ''egid''__);__
25 !!DESCRIPTION
26
27
28 __seteuid__ sets the effective user ID of the current
29 process. Unprivileged user processes may only set the
30 effective user ID to the real user ID, the effective user ID
31 or the saved user ID.
32
33
34 Precisely the same holds for __setegid__ with
35 __
36 !!RETURN VALUE
37
38
39 On success, zero is returned. On error, -1 is returned, and
40 ''errno'' is set appropriately.
41 !!ERRORS
42
43
44 __EPERM__
45
46
47 The current process is not the super-user and ''euid''
48 (resp. ''egid'') is not the real user (group) ID, the
49 effective user (group) ID or the saved user (group)
50 ID.
51 !!NOTES
52
53
54 Setting the effective user (group) ID to the saved user
55 (group) ID is possible since Linux 1.1.37 (1.1.38). On an
56 arbitrary system one should check
57 _POSIX_SAVED_IDS.
58
59
60 Under libc4, libc5 and glibc2.0
61 __seteuid(__''euid''__)__ is equivalent to
62 __setreuid(-1,__ ''euid''__)__ and hence may change
63 the saved user ID. Under glibc2.1 it is equivalent to
64 __setresuid(-1,__ ''euid''__,-1)__ and hence does
65 not change the saved user ID. Similar remarks hold for
66 __setegid__.
67 !!CONFORMING TO
68
69
70 BSD 4.3
71 !!SEE ALSO
72
73
74 geteuid(2), setuid(2), setreuid(2),
75 setresuid(2)
76 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.