DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

getuid(S)


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), setuid(S)

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 .


© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003