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
libutil: add O_NOCTTY back to old pty open code
[minix.git]
/
lib
/
libminlib
/
getnuid.c
blob
f02d1dbd9c86f350f07019cf449ef28d22cbf181
1
#include <lib.h>
2
#include <unistd.h>
3
4
uid_t
getnuid
(
endpoint_t proc_ep
)
5
{
6
message m
;
7
m
.
m1_i1
=
proc_ep
;
/* search uid for this process */
8
if
(
_syscall
(
PM_PROC_NR
,
GETEPINFO
, &
m
) <
0
)
return
( (
uid_t
) -
1
);
9
return
( (
uid_t
)
m
.
m2_i1
);
/* return search result */
10
}