'\" te .\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright 1989 AT&T .TH getuid 2 "28 Dec 1996" "SunOS 5.11" "System Calls" .SH NAME getuid, geteuid, getgid, getegid \- get real user, effective user, real group, and effective group IDs .SH SYNOPSIS .LP .nf #include #include \fBuid_t\fR \fBgetuid\fR(\fBvoid\fR); .fi .LP .nf \fBuid_t\fR \fBgeteuid\fR(\fBvoid\fR); .fi .LP .nf \fBgid_t\fR \fBgetgid\fR(\fBvoid\fR); .fi .LP .nf \fBgid_t\fR \fBgetegid\fR(\fBvoid\fR); .fi .SH DESCRIPTION .sp .LP The \fBgetuid()\fR function returns the real user \fBID\fR of the calling process. The real user \fBID\fR identifies the person who is logged in. .sp .LP The \fBgeteuid()\fR function returns the effective user \fBID\fR of the calling process. The effective user \fBID\fR gives the process various permissions during execution of "set-user-ID" mode processes which use \fBgetuid()\fR to determine the real user \fBID\fR of the process that invoked them. .sp .LP The \fBgetgid()\fR function returns the real group \fBID\fR of the calling process. .sp .LP The \fBgetegid()\fR function returns the effective group \fBID\fR of the calling process. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelAsync-Signal-Safe _ StandardSee \fBstandards\fR(5). .TE .SH SEE ALSO .sp .LP \fBIntro\fR(2), \fBsetuid\fR(2), \fBattributes\fR(5), \fBstandards\fR(5)