Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Fix an inversion in checking for authorization to d...
details: https://anonhg.NetBSD.org/src/rev/30d2d7df6f5c
branches: trunk
changeset: 788993:30d2d7df6f5c
user: spz <spz%NetBSD.org@localhost>
date: Fri Aug 02 20:00:33 2013 +0000
description:
Fix an inversion in checking for authorization to drop TCP connections
found (and the obvious fix suggested) by Sander Bos.
diffstat:
sys/kern/uipc_socket.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 68bdfb7f23ed -r 30d2d7df6f5c sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c Fri Aug 02 16:51:25 2013 +0000
+++ b/sys/kern/uipc_socket.c Fri Aug 02 20:00:33 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_socket.c,v 1.215 2013/04/08 21:12:33 skrll Exp $ */
+/* $NetBSD: uipc_socket.c,v 1.216 2013/08/02 20:00:33 spz 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.215 2013/04/08 21:12:33 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.216 2013/08/02 20:00:33 spz Exp $");
#include "opt_compat_netbsd.h"
#include "opt_sock_counters.h"
@@ -416,7 +416,7 @@
/* Normal users can only drop their own connections. */
struct socket *so = (struct socket *)arg1;
- if (proc_uidmatch(cred, so->so_cred))
+ if (proc_uidmatch(cred, so->so_cred) == 0)
result = KAUTH_RESULT_ALLOW;
break;
Home |
Main Index |
Thread Index |
Old Index