xref: /csrg-svn/lib/libc/sys/getuid.2 (revision 61181)
1*61181Sbostic.\" Copyright (c) 1980, 1991, 1993
2*61181Sbostic.\"	The Regents of the University of California.  All rights reserved.
320074Smckusick.\"
447208Scael.\" %sccs.include.redist.man%
520074Smckusick.\"
6*61181Sbostic.\"     @(#)getuid.2	8.1 (Berkeley) 06/04/93
747208Scael.\"
847208Scael.Dd
947208Scael.Dt GETUID 2
1047208Scael.Os BSD 4
1147208Scael.Sh NAME
1247208Scael.Nm getuid ,
1347208Scael.Nm geteuid
1447208Scael.Nd get user identification
1547208Scael.Sh SYNOPSIS
1647208Scael.Fd #include <unistd.h>
1747208Scael.Fd #include <sys/types.h>
1847208Scael.Ft uid_t
1947208Scael.Fn getuid void
2047208Scael.Ft uid_t
2147208Scael.Fn geteuid void
2247208Scael.Sh DESCRIPTION
2347208ScaelThe
2447208Scael.Fn getuid
2547208Scaelfunction returns the real user ID of the calling process.
2647208ScaelThe
2747208Scael.Fn geteuid
2847208Scaelfunction
2947208Scaelreturns the effective user ID of the calling process.
3047208Scael.Pp
3147208ScaelThe real user ID is that of the user who has invoked the program.
3247208ScaelAs the effective user ID
3320075Smckusickgives the process additional permissions during
3447208Scaelexecution of
3547208Scael.Dq Em set-user-ID
3647208Scaelmode processes,
3747208Scael.Fn getuid
3847208Scaelis used to determine the real-user-id of the calling process.
3947208Scael.Sh ERRORS
4047208ScaelThe
4147208Scael.Fn getuid
4247208Scaeland
4347208Scael.Fn geteuid
4447208Scaelfunctions are always successful, and no return value is reserved to
4547208Scaelindicate an error.
4647208Scael.Sh SEE ALSO
4747208Scael.Xr getgid 2 ,
4847208Scael.Xr setreuid 2
4947208Scael.Sh STANDARDS
5047208Scael.Fn Geteuid
5147208Scaeland
5247208Scael.Fn getuid
5347208Scaelconform to IEEE Std 1003.1-1988
5447208Scael.Pq Dq Tn POSIX .
55