diff options
author | jasoni <jasoni@cvs.openbsd.org> | 2002-06-05 19:43:26 +0000 |
---|---|---|
committer | jasoni <jasoni@cvs.openbsd.org> | 2002-06-05 19:43:26 +0000 |
commit | 4bed8e3cfea9090e7c0f12c763c3f8bfb6703594 (patch) | |
tree | d0cef0d346a4709c2dcb9e41523d88230f40671a /sys/compat/linux/linux_misc.c | |
parent | 24c1324e0fd43810d5c97814e3b5f3a6bb71a6a7 (diff) |
provide local versions of getpid, getuid and getgid that do not
stuff a value in retval[1] as newer linux libs puke on it.
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
-rw-r--r-- | sys/compat/linux/linux_misc.c | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 17ed62e7b22..4054b4f4f48 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_misc.c,v 1.42 2002/03/14 20:31:31 mickey Exp $ */ +/* $OpenBSD: linux_misc.c,v 1.43 2002/06/05 19:43:25 jasoni Exp $ */ /* $NetBSD: linux_misc.c,v 1.27 1996/05/20 01:59:21 fvdl Exp $ */ /* @@ -1487,3 +1487,36 @@ linux_sys_stime(p, v, retval) return 0; } + +int +linux_sys_getpid(p, v, retval) + struct proc *p; + void *v; + register_t *retval; +{ + + *retval = p->p_pid; + return (0); +} + +int +linux_sys_getuid(p, v, retval) + struct proc *p; + void *v; + register_t *retval; +{ + + *retval = p->p_cred->p_ruid; + return (0); +} + +int +linux_sys_getgid(p, v, retval) + struct proc *p; + void *v; + register_t *retval; +{ + + *retval = p->p_cred->p_rgid; + return (0); +} |