repo.or.cz
/
minix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
vm: fix failed alloc condition
[minix.git]
/
lib
/
libc
/
sys-minix
/
setuid.c
blob
0d066bea8cd76cd2dde54b8cca41e2193ff21cf7
1
#include <sys/cdefs.h>
2
#include <lib.h>
3
#include
"namespace.h"
4
5
#include <unistd.h>
6
7
#ifdef __weak_alias
8
__weak_alias
(
setuid
,
_setuid
)
9
__weak_alias
(
seteuid
,
_seteuid
)
10
#endif
11
12
int
setuid
(
uid_t usr
)
13
{
14
message m
;
15
16
m
.
m1_i1
=
usr
;
17
return
(
_syscall
(
PM_PROC_NR
,
SETUID
, &
m
));
18
}
19
20
int
seteuid
(
uid_t usr
)
21
{
22
message m
;
23
24
m
.
m1_i1
=
usr
;
25
return
(
_syscall
(
PM_PROC_NR
,
SETEUID
, &
m
));
26
}