Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern KAUTH_GENERIC_CANSEE -> KAUTH_REQ_NETWORK_SOCKET_CA...
details: https://anonhg.NetBSD.org/src/rev/c70a65715274
branches: trunk
changeset: 747861:c70a65715274
user: elad <elad%NetBSD.org@localhost>
date: Sat Oct 03 20:24:39 2009 +0000
description:
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.
diffstat:
sys/kern/uipc_domain.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (36 lines):
diff -r f52e50e688e6 -r c70a65715274 sys/kern/uipc_domain.c
--- a/sys/kern/uipc_domain.c Sat Oct 03 19:19:59 2009 +0000
+++ b/sys/kern/uipc_domain.c Sat Oct 03 20:24:39 2009 +0000
@@ -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++;
Home |
Main Index |
Thread Index |
Old Index