Commit | Line | Data |
---|---|---|
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 | .\" | |
9c9177ce | 5 | .\" @(#)getuid.2 6.1 (Berkeley) %G% |
42a92ee6 | 6 | .\" |
9c9177ce | 7 | .TH GETUID 2 "" |
42a92ee6 KM |
8 | .UC 4 |
9 | .SH NAME | |
6db89aec | 10 | getuid, geteuid \- get user identity |
42a92ee6 | 11 | .SH SYNOPSIS |
6db89aec KM |
12 | .ft B |
13 | .nf | |
14 | uid = getuid() | |
15 | int uid; | |
42a92ee6 | 16 | .PP |
6db89aec KM |
17 | .ft B |
18 | euid = geteuid() | |
19 | int euid; | |
20 | .fi | |
42a92ee6 KM |
21 | .SH DESCRIPTION |
22 | .I Getuid | |
23 | returns the real user ID of the current process, | |
24 | .I geteuid | |
25 | the effective user ID. | |
42a92ee6 | 26 | .PP |
6db89aec KM |
27 | The real user ID identifies the person who is logged in. |
28 | The effective user ID | |
29 | gives the process additional permissions during | |
30 | execution of \*(lqset-user-ID\*(rq mode processes, which use | |
31 | \fIgetuid\fP to determine the real-user-id of the process which | |
32 | invoked them. | |
42a92ee6 | 33 | .SH "SEE ALSO" |
6db89aec | 34 | getgid(2), setreuid(2) |