getuid(S-osr5)
getuid, geteuid, getgid, getegid --
get real user, effective user, real group, and effective group IDs
Syntax
cc . . . -lc
#include <unistd.h>
uid_t getuid(void);
uid_t geteuid(void);
gid_t getgid(void);
gid_t getegid(void);
Description
-
The getuid routine returns the real user ID
of the calling process.
-
The geteuid routine returns the effective user
ID of the calling process.
-
The getgid routine returns the real group
ID of the calling process.
-
The getegid routine returns the effective group
ID of the calling process.
Diagnostics
These routines are always successful and therefore no errors
defined.
See also
setgid(S-osr5),
setuid(S-osr5)
Standards conformance
getegid, geteuid, getgid and getuid
are conformant with:
AT&T SVID Issue 3;
X/Open CAE Specification, System Interfaces and Headers, Issue 4, 1992;
IEEE POSIX Std 1003.1-1990 System Application Program Interface (API) [C Language] (ISO/IEC 9945-1)
;
and
NIST FIPS 151-1
.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005