ladybird/Base/usr/share/man/man2/setuid.md
Nico Weber 1f323076f0 Add man pages for seteuid() and friends.
Also add an overview page that explains the general concepts.
2020-07-03 19:37:28 +02:00

857 B

Name

setuid, setgid - set user / group ID

Synopsis

#include <unistd.h>

int setuid(uid_t);
int setgid(gid_t);

Description

Sets all of real, effective, and saved user or group ID to the given ID.

For non-superusers, the given ID has to be equal to the current real or effective ID for the call to succeed.

Return value

If the call was set successful, returns 0. Else, returns -1 and sets errno to describe the error.

Errors

  • EPERM: The new ID is not equal to the real ID or effective ID, and the user is not superuser.

See also