Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Use credentials from the socket.
details: https://anonhg.NetBSD.org/src/rev/74e090629884
branches: trunk
changeset: 750402:74e090629884
user: elad <elad%NetBSD.org@localhost>
date: Wed Dec 30 06:58:50 2009 +0000
description:
Use credentials from the socket.
diffstat:
sys/kern/uipc_socket.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diffs (30 lines):
diff -r 48f928f470ba -r 74e090629884 sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c Wed Dec 30 01:37:17 2009 +0000
+++ b/sys/kern/uipc_socket.c Wed Dec 30 06:58:50 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_socket.c,v 1.198 2009/12/29 04:23:43 elad Exp $ */
+/* $NetBSD: uipc_socket.c,v 1.199 2009/12/30 06:58:50 elad Exp $ */
/*-
* Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.198 2009/12/29 04:23:43 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.199 2009/12/30 06:58:50 elad Exp $");
#include "opt_compat_netbsd.h"
#include "opt_sock_counters.h"
@@ -452,10 +452,8 @@
case KAUTH_REQ_NETWORK_SOCKET_DROP: {
/* Normal users can only drop their own connections. */
struct socket *so = (struct socket *)arg1;
- uid_t sockuid = so->so_uidinfo->ui_uid;
- if (sockuid == kauth_cred_getuid(cred) ||
- sockuid == kauth_cred_geteuid(cred))
+ if (proc_uidmatch(cred, so->so_cred))
result = KAUTH_RESULT_ALLOW;
break;
Home |
Main Index |
Thread Index |
Old Index