summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_misc.c
diff options
context:
space:
mode:
authorjasoni <jasoni@openbsd.org>2002-06-05 19:43:25 +0000
committerjasoni <jasoni@openbsd.org>2002-06-05 19:43:25 +0000
commitef1b9162ade5db30200d0a25b34931c1bd84c4bb (patch)
tree81562bc3927a415e074284034f8e584a0c30ccb9 /sys/compat/linux/linux_misc.c
parentGet rid of an unnecessary typedef (for future cleanup). (diff)
downloadwireguard-openbsd-ef1b9162ade5db30200d0a25b34931c1bd84c4bb.tar.xz
wireguard-openbsd-ef1b9162ade5db30200d0a25b34931c1bd84c4bb.zip
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.c35
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);
+}