GETUID(2) BSD Programmer's Manual GETUID(2)
getuid, geteuid - get user identification
#include <sys/types.h> #include <unistd.h> uid_t getuid(void); uid_t geteuid(void);
The getuid() function returns the real user ID of the calling process. The geteuid() function returns the effective user ID of the calling pro- cess. The real user ID is that of the user who has invoked the program. As the effective user ID gives the process additional permissions during execu- tion of "set-user-ID" mode processes, getuid() is used to determine the real user ID of the calling process.
The getuid() and geteuid() functions are always successful, and no return value is reserved to indicate an error.
getgid(2), setreuid(2), setuid(2)
The getuid() and geteuid() functions conform to IEEE Std 1003.1-1988 ("POSIX"). MirOS BSD #10-current June 4, 1993 1
Generated on 2013-04-27 00:20:00 by $MirOS: src/scripts/roff2htm,v 1.77 2013/01/01 20:49:09 tg Exp $
These manual pages and other documentation are copyrighted by their respective writers;
their source is available at our CVSweb,
AnonCVS, and other mirrors. The rest is Copyright © 2002‒2013 The MirOS Project, Germany.
This product includes material provided by Thorsten Glaser.
This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report – diffs preferred.