4.104.114.84.95
Last change
on this file since d49ce82 was
089abb6d,
checked in by Joel Sherrill <joel.sherrill@…>, on 01/16/02 at 22:52:27
|
2002-02-09 Ralf Corsepius <corsepiu@…>
- src/getegid.c: Add #include <rtems/userenv.h>.
Remove #include <rtems/libio_.h>.
- src/geteuid.c: Ditto.
- src/getgid.c: Ditto.
- src/getlogin.c: Ditto.
- src/getuid.c: Ditto.
|
-
Property mode set to
100644
|
File size:
637 bytes
|
Line | |
---|
1 | /* |
---|
2 | * $Id$ |
---|
3 | */ |
---|
4 | |
---|
5 | #if HAVE_CONFIG_H |
---|
6 | #include "config.h" |
---|
7 | #endif |
---|
8 | |
---|
9 | #include <limits.h> |
---|
10 | #include <errno.h> |
---|
11 | #include <string.h> |
---|
12 | #include <sys/types.h> |
---|
13 | |
---|
14 | #include <rtems/system.h> |
---|
15 | #include <rtems/score/object.h> |
---|
16 | #include <rtems/seterr.h> |
---|
17 | |
---|
18 | #include <rtems/userenv.h> |
---|
19 | |
---|
20 | /* |
---|
21 | * MACRO in userenv.h |
---|
22 | * |
---|
23 | uid_t _POSIX_types_Uid = 0; |
---|
24 | */ |
---|
25 | |
---|
26 | /*PAGE |
---|
27 | * |
---|
28 | * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, |
---|
29 | * P1003.1b-1993, p. 84 |
---|
30 | */ |
---|
31 | |
---|
32 | uid_t getuid( void ) |
---|
33 | { |
---|
34 | return _POSIX_types_Uid; |
---|
35 | } |
---|
36 | |
---|
37 | /*PAGE |
---|
38 | * |
---|
39 | * 4.2.2 Set User and Group IDs, P1003.1b-1993, p. 84 |
---|
40 | */ |
---|
41 | |
---|
42 | int setuid( |
---|
43 | uid_t uid |
---|
44 | ) |
---|
45 | { |
---|
46 | _POSIX_types_Uid = uid; |
---|
47 | return 0; |
---|
48 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.