SETEUID(3P)
π SETEUID π (that's SETEUID(3P) bestie, from the POSIX Programmer's Manual, page 3P)
πΈ PROLOG πΈ
okay so real talk first: this page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ β so if you're on Linux, go peek at the corresponding Linux manual page for the actual tea β. Or honestly? The interface might just not be implemented on Linux at all. Vibe check accordingly. π
β¨ NAME β¨
seteuid β set effective user ID π«Ά
π SYNOPSIS π
#include <unistd.h>
int seteuid(uid_t uid);
π¦ DESCRIPTION π¦
Okay so here's the deal, bestie. If uid is equal to the real user ID or the saved set-user-ID, or if the process has appropriate privileges, then seteuid() shall set the effective user ID of the calling process to uid. Periodt. π
And the way that the real user ID and the saved set-user-ID just⦠stay unchanged? Iconic. They don't move. They're not involved. They said "not my business."
Also seteuid() shall not affect the supplementary group list in any way. Not even a little. Zero. Nada. It leaves that list completely alone π
β RETURN VALUE β
Slayed? You get 0 back. π
Didn't slay? You get -1, and errno gets set to tell you what went wrong. π
π₯ ERRORS π₯
The seteuid() function shall fail if:
EINVALβ the value of theuidargument is invalid and is not supported by the implementation. Likeβ¦ it's just not a thing here, bestie.EPERMβ the process does not have appropriate privileges anduiddoes not match the real user ID or the saved set-user-ID. So you tried it and the system said no π
The following sections are informative. (Yes really, we're in the chill zone now π)
πΈ EXAMPLES πΈ
None. That's it. That's the section. Moving on π§
π APPLICATION USAGE π
None. Also empty. We love a low-effort section, no cap.
π RATIONALE π
Refer to the RATIONALE section in setuid(). Go read that one, it's got the lore πβ¨
π FUTURE DIRECTIONS π
None. The future is⦠unchanged. Very demure.
π SEE ALSO π
execgetegid()geteuid()getgid()getuid()setegid()setgid()setregid()setreuid()setuid()
The Base Definitions volume of POSIX.1β2017, <sys_types.h>, <unistd.h> π
π COPYRIGHT π
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
okay that's the whole thing, every last detail, nothing skipped, we ate and left no crumbs π
IEEE/The Open Group, 2017 β SETEUID(3P) π bye bestie, go set some effective user IDs responsibly π«Άβ¨
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms