summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_misc.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2010-06-30 21:54:12 +0000
committerguenther <guenther@openbsd.org>2010-06-30 21:54:12 +0000
commit46413ba0866fae812e371d10a6a30cafe16051f3 (patch)
tree6619bb1759d0bca4342cfc6cb565f00de01b96ac /sys/compat/linux/linux_misc.c
parentDon't prune page cache directly when adding to it. Fixes a crash with a (diff)
downloadwireguard-openbsd-46413ba0866fae812e371d10a6a30cafe16051f3.tar.xz
wireguard-openbsd-46413ba0866fae812e371d10a6a30cafe16051f3.zip
Merge from NetBSD: "Linux's getsid(2) does in fact return a pid,
not a pointer." So just use the native implementation. ok deraadt@
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
-rw-r--r--sys/compat/linux/linux_misc.c29
1 files changed, 1 insertions, 28 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 8c68145736a..5def1551993 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.63 2009/09/05 10:28:43 miod Exp $ */
+/* $OpenBSD: linux_misc.c,v 1.64 2010/06/30 21:54:35 guenther Exp $ */
/* $NetBSD: linux_misc.c,v 1.27 1996/05/20 01:59:21 fvdl Exp $ */
/*-
@@ -1302,33 +1302,6 @@ linux_sys_setregid16(p, v, retval)
}
int
-linux_sys_getsid(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct linux_sys_getsid_args /* {
- syscallarg(int) pid;
- } */ *uap = v;
- struct proc *p1;
- pid_t pid;
-
- pid = (pid_t)SCARG(uap, pid);
-
- if (pid == 0) {
- retval[0] = (int)p->p_session; /* XXX Oh well */
- return 0;
- }
-
- p1 = pfind((int)pid);
- if (p1 == NULL)
- return ESRCH;
-
- retval[0] = (int)p1->p_session;
- return 0;
-}
-
-int
linux_sys___sysctl(p, v, retval)
struct proc *p;
void *v;