Module Name: src
Committed By: elad
Date: Sat Oct 3 20:24:39 UTC 2009
Modified Files:
src/sys/kern: uipc_domain.c
Log Message:
KAUTH_GENERIC_CANSEE -> KAUTH_REQ_NETWORK_SOCKET_CANSEE.
Not quite the same semantics but it's okay. Once our sockets have
credentials (and they will) it's all the same.
To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/kern/uipc_domain.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/uipc_domain.c
diff -u src/sys/kern/uipc_domain.c:1.84 src/sys/kern/uipc_domain.c:1.85
--- src/sys/kern/uipc_domain.c:1.84 Fri Sep 11 22:06:29 2009
+++ src/sys/kern/uipc_domain.c Sat Oct 3 20:24:39 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_domain.c,v 1.84 2009/09/11 22:06:29 dyoung Exp $ */
+/* $NetBSD: uipc_domain.c,v 1.85 2009/10/03 20:24:39 elad Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_domain.c,v 1.84 2009/09/11 22:06:29 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_domain.c,v 1.85 2009/10/03 20:24:39 elad Exp $");
#include <sys/param.h>
#include <sys/socket.h>
@@ -455,14 +455,14 @@
if (fp->f_count == 0 || fp->f_type != DTYPE_SOCKET ||
fp->f_data == NULL)
continue;
- if (kauth_authorize_generic(l->l_cred,
- KAUTH_GENERIC_CANSEE, fp->f_cred) != 0)
- continue;
so = (struct socket *)fp->f_data;
if (so->so_type != type)
continue;
if (so->so_proto->pr_domain->dom_family != pf)
continue;
+ if (kauth_authorize_network(l->l_cred, KAUTH_NETWORK_SOCKET,
+ KAUTH_REQ_NETWORK_SOCKET_CANSEE, so, NULL, NULL) != 0)
+ continue;
if (len >= elem_size && elem_count > 0) {
mutex_enter(&fp->f_lock);
fp->f_count++;