fix copyright and condition notice for new sccs include
[unix-history] / usr / src / lib / libc / sys / getuid.2
CommitLineData
42a92ee6
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
345fe298 5.\" @(#)getuid.2 6.3 (Berkeley) %G%
42a92ee6 6.\"
9c9177ce 7.TH GETUID 2 ""
42a92ee6
KM
8.UC 4
9.SH NAME
6db89aec 10getuid, geteuid \- get user identity
42a92ee6 11.SH SYNOPSIS
345fe298
KM
12.nf
13.ft B
14#include <sys/types.h>
15.PP
6db89aec
KM
16.ft B
17.nf
18uid = getuid()
345fe298 19uid_t uid;
42a92ee6 20.PP
6db89aec
KM
21.ft B
22euid = geteuid()
345fe298 23uid_t euid;
6db89aec 24.fi
42a92ee6
KM
25.SH DESCRIPTION
26.I Getuid
27returns the real user ID of the current process,
28.I geteuid
29the effective user ID.
42a92ee6 30.PP
6db89aec
KM
31The real user ID identifies the person who is logged in.
32The effective user ID
33gives the process additional permissions during
34execution of \*(lqset-user-ID\*(rq mode processes, which use
63b0bb9c 35\fIgetuid\fP to determine the real-user-id of the process that
6db89aec 36invoked them.
42a92ee6 37.SH "SEE ALSO"
6db89aec 38getgid(2), setreuid(2)