Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/kern/uipc_socket.c,v retrieving revision 1.201 retrieving revision 1.201.2.1 diff -u -p -r1.201 -r1.201.2.1 --- src/sys/kern/uipc_socket.c 2010/10/14 03:07:51 1.201 +++ src/sys/kern/uipc_socket.c 2011/06/06 09:09:39 1.201.2.1 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_socket.c,v 1.201 2010/10/14 03:07:51 oki Exp $ */ +/* $NetBSD: uipc_socket.c,v 1.201.2.1 2011/06/06 09:09:39 jruoho Exp $ */ /*- * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.201 2010/10/14 03:07:51 oki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.201.2.1 2011/06/06 09:09:39 jruoho Exp $"); #include "opt_compat_netbsd.h" #include "opt_sock_counters.h" @@ -98,7 +98,9 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_socket. #include #endif -#include +#include +#include +#include MALLOC_DEFINE(M_SOOPTS, "soopts", "socket options"); MALLOC_DEFINE(M_SONAME, "soname", "socket name"); @@ -461,9 +463,10 @@ socket_listener_cb(kauth_cred_t cred, ka case KAUTH_REQ_NETWORK_SOCKET_OPEN: /* We allow "raw" routing/bluetooth sockets to anyone. */ - if ((u_long)arg1 == PF_ROUTE || (u_long)arg1 == PF_BLUETOOTH) + if ((u_long)arg1 == PF_ROUTE || (u_long)arg1 == PF_OROUTE + || (u_long)arg1 == PF_BLUETOOTH) { result = KAUTH_RESULT_ALLOW; - else { + } else { /* Privileged, let secmodel handle this. */ if ((u_long)arg2 == SOCK_RAW) break;