'\" te .\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright 1989 AT&T .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH GETUID 2 "Dec 28, 1996" .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(7) for descriptions of the following attributes: .sp .sp .TS box; c | c l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Standard _ MT-Level Async-Signal-Safe .TE .SH SEE ALSO .sp .LP .BR Intro (2), .BR setuid (2), .BR attributes (7), .BR standards (7)