1SETEUID(3P) POSIX Programmer's Manual SETEUID(3P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
12 seteuid — set effective user ID
13
15 #include <unistd.h>
16
17 int seteuid(uid_t uid);
18
20 If uid is equal to the real user ID or the saved set-user-ID, or if the
21 process has appropriate privileges, seteuid() shall set the effective
22 user ID of the calling process to uid; the real user ID and saved set-
23 user-ID shall remain unchanged.
24
25 The seteuid() function shall not affect the supplementary group list in
26 any way.
27
29 Upon successful completion, 0 shall be returned; otherwise, -1 shall be
30 returned and errno set to indicate the error.
31
33 The seteuid() function shall fail if:
34
35 EINVAL The value of the uid argument is invalid and is not supported by
36 the implementation.
37
38 EPERM The process does not have appropriate privileges and uid does
39 not match the real user ID or the saved set-user-ID.
40
41 The following sections are informative.
42
44 None.
45
47 None.
48
50 Refer to the RATIONALE section in setuid().
51
53 None.
54
56 exec, getegid(), geteuid(), getgid(), getuid(), setegid(), setgid(),
57 setregid(), setreuid(), setuid()
58
59 The Base Definitions volume of POSIX.1‐2017, <sys_types.h>, <unistd.h>
60
62 Portions of this text are reprinted and reproduced in electronic form
63 from IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
64 table Operating System Interface (POSIX), The Open Group Base Specifi‐
65 cations Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of
66 Electrical and Electronics Engineers, Inc and The Open Group. In the
67 event of any discrepancy between this version and the original IEEE and
68 The Open Group Standard, the original IEEE and The Open Group Standard
69 is the referee document. The original Standard can be obtained online
70 at http://www.opengroup.org/unix/online.html .
71
72 Any typographical or formatting errors that appear in this page are
73 most likely to have been introduced during the conversion of the source
74 files to man page format. To report such errors, see https://www.ker‐
75 nel.org/doc/man-pages/reporting_bugs.html .
76
77
78
79IEEE/The Open Group 2017 SETEUID(3P)